Menu ▾ ▴

#2902 noautoscale and plot with boxes

None
pending-fixed
nobody
None
1 day ago
2 days ago
Anonymous
No

I am using gnuplot Version 6.0 patchlevel 5, and I am plotting a number of data files in one plot. Some of the files plot with lines, one with boxes. I would like the axes' ranges only to be determined by the data plotted with lines, but the box-plot seems to ignore my noautoscale command.

Minimal example to reproduce:

plot '-' with lines, '-' using 1:2 with lines noautoscale
1 1
2 2
e
-1 -1
3 4
e

produces a plot from (1, 1) to (2, 2) as expected, but if replaced by

plot '-' with lines, '-' using 1:2:(0.5) with boxes noautoscale
... (same data) ...

I get a plot from (0, 1) to (2, 2). Leaving the box width (third using specifier) out, I get different, but still wrong ranges.

Discussion

  • Ethan Merritt

    Ethan Merritt - 1 day ago

    Autoscaling is suppressed by the plot command given. You can see that in the y axis range. However by default there is a separate step where the x-axis range is adjusted to span the full width of the left-most box and the right-most box. WIthout this, auto-scaling based on the data x coordinates would terminate the x-axis range at the midpoints of these boxes so half of the box would be clipped.

    So yes, it can be considered a bug that the "noautoscale" specifier does not also suppress this additional step. Fixed now. But be aware that after this change, if you select "noautoscale" the boxes on each end may be clipped.

     
  • Ethan Merritt

    Ethan Merritt - 1 day ago
    • status: open --> pending-fixed
    • Group: -->
    • Priority: -->
     

Log in to post a comment.