|
From: Ethan A M. <merritt@u.washington.edu> - 2014-04-22 21:36:32
|
On Tuesday, 22 April, 2014 22:57:01 Karl-Friedrich Ratzsch wrote: > On 22.04.2014 08:13, Tait wrote: > > In the current versions (4.6p3 or p5), the initial []-enclosed values > > are taken as the overall x- and y- range. > > plot [5:11][3:12] x, x/2+4 > > is equivalent to > > set xrange [5:11]; set yrange [3:12]; plot x, x/2+4 > > and a range like [7:9] before the x/2+4 is a syntax error. > > > > Changing this as outlined above (and apparently as-implemented in > > CVS?) is incompatible because now the [3:12] above would be a syntax > > error* and the [5:11] would apply only to the x and not to the x/2+4 > > line, and the overall plot x-range is still presumably at its previous > > setting, or default [-10:10]. > > As far as i can see, the behaviour in 50 ist absolutely identical > from the point of 4.6, also with your example. > > But the new syntax with the "sample" keyword looks rather sketchy to me: > > plot sample [-1:0] -x, [0:1] x > > Wouldn´t backward compatibility also be achieved by adding a keyword > to "set xrange", e.g. "set xrange [0:1] axislength", meaning that > the sampling is to be done per-line, and the axis length be taken > from xrange? The "sample [min:max]", as its name suggests, controls the axis being sampled (usually t or x). This is particularly relevant for parametric plots, but does apply to function plots as well. If you need to distinguish between the sampled axis (t) and the x axis you can provide separate ranges for each. See "help plot sampling" > Oh, and i noted that replot still doesn´t accept an explicit range, > even in "per-line" mode. Would that be possible? Why would you ever need this? Wouldn't "set xrange [min:max]; replot" do the same thing? That's what zoom/unzoom does. Ethan |