|
From: Dima K. <gn...@di...> - 2013-03-06 21:27:28
|
Hi. I'm observing that trange settings are ignored when making parametric plots from data files. This works as expected: set parametric set trange [-5:3] plot t,t*t I see a parabola with x=[-5..3] This is suprising, however: set parametric set trange [-5:3] plot 'dat' with 'dat' containing 0 0 1 1 2 4 3 9 4 16 5 25 Here I see all the points being plotted, not limited at t=3, as I expected. Is this intended behavior or a bug? If it's correct, then the documentation should be expanded a bit to mention this detail. Should I add this to the docs? dima |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2013-03-06 21:42:44
|
On 06.03.2013 22:27, Dima Kogan wrote: > I'm observing that trange settings are ignored when making parametric > plots from data files. They can't be, because there is nu such thing as a parametric plot from a data file. Parametric mode is a property of function plots. > plot 'dat' > > with 'dat' containing > > 0 0 > 1 1 > 2 4 > 3 9 > 4 16 > 5 25 That file has two columns: one full of 'x' values, the other full of 'y' values. What on earth would the t range have to do with plotting it? > Here I see all the points being plotted, not limited at t=3, as I > expected. Your expectation is at odds with the meaning of the commands you're using. |
|
From: Dima K. <gn...@di...> - 2013-03-06 22:11:26
|
Hans-Bernhard Bröker <HBB...@t-...> writes: > On 06.03.2013 22:27, Dima Kogan wrote: > >> I'm observing that trange settings are ignored when making parametric >> plots from data files. > > They can't be, because there is nu such thing as a parametric plot from > a data file. Parametric mode is a property of function plots. Hmmm. You're right; this doesn't make sense. In that case, should gnuplot be plotting anything at all? Would it be more appropriate for it to simply emit and error message and refuse to plot anything? dima |
|
From: Hans-Bernhard B. <HBB...@t-...> - 2013-03-06 22:20:40
|
On 06.03.2013 22:52, Dima Kogan wrote: > Hans-Bernhard Bröker <HBB...@t-...> writes: >> They can't be, because there is nu such thing as a parametric plot from >> a data file. Parametric mode is a property of function plots. > Hmmm. You're right; this doesn't make sense. In that case, should > gnuplot be plotting anything at all? Would it be more appropriate for it > to simply emit and error message and refuse to plot anything? What on earth should it do _that_ for? There's nothing wrong there. Having parametric mode and trange set while you doing a pure data plot is just _irrelevant_, but not wrong. |
|
From: Dima K. <gn...@di...> - 2013-03-07 19:41:53
|
Hans-Bernhard Bröker <HBB...@t-...> writes: > On 06.03.2013 22:52, Dima Kogan wrote: >> Hans-Bernhard Bröker <HBB...@t-...> writes: > >>> They can't be, because there is nu such thing as a parametric plot from >>> a data file. Parametric mode is a property of function plots. > >> Hmmm. You're right; this doesn't make sense. In that case, should >> gnuplot be plotting anything at all? Would it be more appropriate for it >> to simply emit and error message and refuse to plot anything? > > What on earth should it do _that_ for? There's nothing wrong there. > Having parametric mode and trange set while you doing a pure data plot > is just _irrelevant_, but not wrong. In cases when the user is trying to do something that doesn't make sense it's far better to throw an error (or warning) than to silently do the wrong thing. I am now clear on why 'set parametric' is not connected to plots from files, so I wouldn't benefit from an error message here, but a new user may. That's all I was suggesting. dima |
|
From: Ethan A M. <sf...@us...> - 2013-03-07 19:52:43
|
On Thursday, March 07, 2013 11:41:44 am Dima Kogan wrote: > Hans-Bernhard Bröker <HBB...@t-...> writes: > > > On 06.03.2013 22:52, Dima Kogan wrote: > >> Hans-Bernhard Bröker <HBB...@t-...> writes: > > > >>> They can't be, because there is nu such thing as a parametric plot from > >>> a data file. Parametric mode is a property of function plots. > > > >> Hmmm. You're right; this doesn't make sense. In that case, should > >> gnuplot be plotting anything at all? Would it be more appropriate for it > >> to simply emit and error message and refuse to plot anything? > > > > What on earth should it do _that_ for? There's nothing wrong there. > > Having parametric mode and trange set while you doing a pure data plot > > is just _irrelevant_, but not wrong. > > In cases when the user is trying to do something that doesn't make sense > it's far better to throw an error (or warning) than to silently do the > wrong thing. I am now clear on why 'set parametric' is not connected to > plots from files, so I wouldn't benefit from an error message here, but > a new user may. That's all I was suggesting. There is not, and should not be, any warning for setting a parameter in advance of using it. E.g. there's nothing odd about a script that selects a palette but doesn't use it until several plots later. In general there's nothing odd about loading a file containing your preferred defaults even if only some of them apply to the plot you are about to make. Choosing a customized set of default ranges is simply an example of this. Ethan |