|
From: Dima K. <gn...@di...> - 2012-12-26 20:07:38
|
Hi all. I just hit an issue where doing a plot 'refresh' doesn't respect xrange and yrange settings if volatile data is involved. This behavior appears to have been there a while, so I'm hesitant to call it an implementation bug. To reproduce, create a tst.gp file such as this: set yrange [:3] plot '-' notitle ps 3 1 1 2 2 3 3 4 4 5 5 e Note that the requested y-axis range is limited to show y=3 at the highest end of its range. In gnuplot, issue load "tst.gp" This will make the plot. This may or may not be respecting the yrange at this point, depending on the terminal and if it has refreshed itself. Now issue a 'refresh' command; the 'e' key press would have the same effect in interactive terminals such as x11, wxt and qt. Observe that the replotted data now has y=5 at its top end instead of y=3. This is wrong. Notably, if the data was passed in through a data file instead of inline (through '-'), the bahavior is what you would expect: the yrange is respected. Thus this sounds like a bug to me. I'm attaching a patch that fixes this behavior, to make volatile data plots act like stored ones. I'd like to say upfront that I am not an expert in this area of gnuplot, and it would be great for somebody more knowledgeable to read the patch to make sure it makes sense. Thanks. |