#1206 X-axis not drawn fully with rangelimited set

closed-invalid
nobody
2D plot (258)
5
2015-03-23
2013-02-06
No

X-axis is not drawn all the way left to Y-axis when rangelimited is set.
Tested on 4.4p0 and 4.6p0 on Linux Debian Squeeze and Wheezy.
Same error on both wxt, png and svg plots. Might be related to ticket: 3603546

MWE:
---
# gnuplot file to demonstrate problem with "rangelimited" and svg-plots.

set datafile separator " "
set xdata time
set timefmt "%Y-%m-%d_%H:%M:%S"
set xtics rangelimited format "%d."

set terminal png size 400,400 enhanced
set output 'test.png'
plot '-' using 1:2 with lines
2012-11-09_10:00:33 43.0
2012-11-10_15:39:08 45.0
2012-11-11_15:50:43 42.0
e
---

Discussion

  • Per Dalgas Jakobsen

    Resulting png

     
  • Ethan Merritt

    Ethan Merritt - 2013-02-06

    That is the entire purpose of the "rangelimited" option. It only draws the x and y axes over the range of the data points.

    So - not a bug. It is doing exactly what it is intended to do.

     
  • Ethan Merritt

    Ethan Merritt - 2013-02-06
    • status: open --> open-invalid
     
  • Per Dalgas Jakobsen

    I understand what you mean, however, for date and time a "zero" doesn't make much sense, and thus I believe that the X-axis for a time-series shouldn't present a gap at the start. But if it should one could argue that there should be a gap at the end as well...

     
  • Ethan Merritt

    Ethan Merritt - 2013-02-06

    I think you are confusing several separate plotting options. The rangelimit option causes the axis to be drawn only over (well actually under) the span of the data that is present. That is all it does. It does not extend or otherwise change the range.

    What you refer to as a gap between 0 and the first data point is under the control of at least two different options.

    "set offset" will explicityly expand the range defined by the data points at either end. This option is not in effect by default.

    "set auto {no}extend" controls whether the axis range is extended to end at the next tic unit. That is, if tics are placed every 0.1 units, the range will be extended to the next multiple of 0.1. This is what you refer to as a gap, I think. You can turn it off by saying "set auto noextend".

     
  • Ethan Merritt

    Ethan Merritt - 2013-02-19
    • status: open-invalid --> closed-invalid
    • milestone: --> 5.0
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks