gnuplot> plot sin(x)
gnuplot> set xrange [3.4 : 5.9]
and now I want to replot sin(x) with gnuplot once again choosing the
xrange. I thought setting the autoscale for x might do it, but that
was wrong.
adTHANXvance!
Aaron
--
Aaron Naiman | Jerusalem College of Technology | University of Maryland, IPST
(Aharon) | nai...@math.jct.ac.il | nai...@glue.umd.edu
| http://hobbes.jct.ac.il/~naiman |
> gnuplot> plot sin(x)
> gnuplot> set xrange [3.4 : 5.9]
> and now I want to replot sin(x) with gnuplot once again choosing the
> xrange. I thought setting the autoscale for x might do it, but that
> was wrong.
This is actually one of my pet moans about gnuplot... while xrange is
autoscaled by default, if you do a function plot, it ignores the
autoscale flag and uses the (hidden) explicit ranges.
In a new session, do
set noautoscale x
show xrange
and the previously-hidden internal values are revealed.
set xrange [-10:10]
set autoscale x
To restore autoscaled x, with the correct hidden values.
Actually, presumably this is a failing of a save/load operation - it will
store only the fact that xrange is autoscaled, without restoring the
hidden ranges.
If I had my way, I'd have gnuplot refuse to do a function plot if
xrange is autoscaled and there is no data file to set the range.
A compromise, though, is to make show actually show the hidden values.
[In fact, I seem to remember seeing gnuplot do this - perhaps it was a patch
for 3.6 that made it do something like
show xrange
xrange is autoscaled (currently [-10:10])
?]
To fix save/restore, we'd probably need to save the info as
set xrange [-10:10] autoscale
(3.6 currently has set xrange [min:max] reverse)
dd
--
david....@insignia.co.uk
Tel (01494) 453376 (work) (01494) 459742 (home)