I do not understand the intent of the plot command. Column 0 will run from 0 to \<current value of 'set sample'>, which defaults to 100 and gives the x axis range shown in your plot. But what is column 1? You haven't set an x range, so what exactly is supposed to be sampled, and what are you expecting to see as a y value in the plot?
Last edit: Ethan Merritt 2014-04-13
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I was expecting the + to sample the default xrange [-10:10], as it also does in the first plot command.
I had in mind, that a previous gnuplot version gave an error in this situation: using + without explicit xrange. But that is what happens with splot '++': -> "x range is invalid".
I think, if using plot '+' without explicitely setting an xrange is not supported, it should also give an error like for splot '++'.
Thanks,
Christoph
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have not had occasion to use this mode myself, but I imagine the idea is something like this:
Consider the existing demo mgr . There is a file of observed values and a theoretical function that may or may not fit very well. The demo plots theory as a smooth line and data as points with experimental error bars. Suppose, however, that you had a denser data set and a theoretical but expersive to calculate error model. These commands would plot it:
set samples 11
set offset .1,.1
pred(x)=1.53**2*x/(5.67+x)**2
error(x)=1./x
plot 'battery.dat' using 1:2 smooth csplines with lines,\
'+' using 1:(pred($1)):(error($1)) with yerrorbars
This is a very contrived plot, but the point is that '+' takes its sampling range from the autoscaled range of the previous plot element. That is exactly what your "strange result" does.
I do not understand the intent of the plot command. Column 0 will run from 0 to \<current value of 'set sample'>, which defaults to 100 and gives the x axis range shown in your plot. But what is column 1? You haven't set an x range, so what exactly is supposed to be sampled, and what are you expecting to see as a y value in the plot?
Last edit: Ethan Merritt 2014-04-13
I was expecting the
+to sample the default xrange [-10:10], as it also does in the first plot command.I had in mind, that a previous gnuplot version gave an error in this situation: using
+without explicit xrange. But that is what happens withsplot '++': -> "x range is invalid".I think, if using
plot '+'without explicitely setting an xrange is not supported, it should also give an error like forsplot '++'.Thanks,
Christoph
I have not had occasion to use this mode myself, but I imagine the idea is something like this:
Consider the existing demo mgr . There is a file of observed values and a theoretical function that may or may not fit very well. The demo plots theory as a smooth line and data as points with experimental error bars. Suppose, however, that you had a denser data set and a theoretical but expersive to calculate error model. These commands would plot it:
This is a very contrived plot, but the point is that '+' takes its sampling range from the autoscaled range of the previous plot element. That is exactly what your "strange result" does.
Last edit: Ethan Merritt 2014-04-15
Thanks for the nice example.
At the moment I'm quite active at stackoverflow and there using '+' is very comfortable to demonstrate solutions related to data files.
I need to think a bit more about this:
Currently it seems to be as follows (also for the first plot):
I think the last point was also not clear to me. Don't know if there is something meaningful which one could do here, I'll see.