bug-plotutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-plotutils] graph: issue with title: in certain cases not rendered a


From: Stefan Vargyas
Subject: [Bug-plotutils] graph: issue with title: in certain cases not rendered at all
Date: Sat, 29 Oct 2016 17:09:30 -0700

Dear Robert,

First let me thank you for your very useful software libre.

Now, having used 'graph' these days for generating plots of test
result data from my project Path-Set (http://nongnu.org/path-set),
I came across the following issue of 'graph':

Please take a look at the two PNG files attached. In case of file
'2.png' generated from '2.txt', 'graph' did not rendered the title
of the plot as requested. Notice that in case of '1.png' it did.

Looking into the sources of 'plotutils', I learned that the origin
of my problem is -- as nicely suggested by the comment text -- the
following 'if' statement in 'graph/plotter.c:draw_frame_of_graph':

  if (multigrapher->grid_spec != NO_AXES
      && !multigrapher->y_axis.switch_axis_end /* no title if x axis is at top 
of plot */
      && multigrapher->title != NULL && *multigrapher->title != '\0')

Unfortunately, I found no way to circumvent the boolean parameter
'multigrapher->y_axis.switch_axis_end' be true by way of tweaking
the command line options of the program. Still trying.

Anyway, my supposition is that the issue described above belong to
the category of bugs.

Sincerely,

Stefan Vargyas.


PS: For completeness of description, here are the two commands that
generated '1.png' and '2.png' (the 'convert' program below belongs
to 'ImageMagick'):

  $ gen-png() {
  local f="$1"
  test -f "$f" &&
  graph \
  --toggle-use-color \
  --toggle-frame-on-top \
  --toggle-log-axis=x \
  --output-format png \
  --page-size a4 \
  --symbol 4 .02 \
  --font-name HersheySans-Bold \
  --font-size .038 \
  --grid-style 4 \
  --tick-size -.01 \
  --title-font-size .05 \
  --bitmap-size 2732x2732 \
  --height-of-plot .7 \
  --width-of-plot .7 \
  --line-width .001 \
  --top-label 'path trie total mem' \
  --x-label path-names \
  --y-label percents \
  <(awk '{ print $1, $2 }' "$f") \
  <(awk '{ print $1, $3 }' "$f") \
  <(awk '{ print $1, $4 }' "$f") \
  <(awk '{ print $1, $5 }' "$f")|
  convert - -resize 500x500 -; }

  $ gen-png 1.txt > 1.png

  $ gen-png 2.txt > 2.png


Attachment: 1.txt
Description: Text document

Attachment: 2.txt
Description: Text document

Attachment: 1.png
Description: Binary data

Attachment: 2.png
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]