help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Axis autoscaling works but gives wrong ans?


From: Henry F. Mollet
Subject: Re: Axis autoscaling works but gives wrong ans?
Date: Fri, 23 Jan 2004 14:25:12 -0800
User-agent: Microsoft-Entourage/10.1.1.2418

I get the same result when I use plot (x,y) instead of replot.
That is having used "axis" without any arguments to get back to autoscaling,
the plot *is* using autoscaling (which is 0, 10, 0, 10 in this case) *but*:

octave:8> axis
ans =
   -1   11   -1   11
octave:9> show xrange
warning: show is obsolete -- use gshow instead
octave:10> 
        set xrange [* : *] noreverse nowriteback  # (currently
[-1.00000:11.0000] )
octave:10> show yrange
warning: show is obsolete -- use gshow instead

        set yrange [* : *] noreverse nowriteback  # (currently
[-1.00000:11.0000] )

The axis arguments given above are not what is being used for the plot. When
I use "axis" it resets the arguments to default *for the plot* but somehow
"ans", as well as "xrange" or "yrange" are are *not* reset.
Henry 


on 1/23/04 1:56 PM, Dmitri A. Sergatskov at address@hidden wrote:

> Henry F. Mollet wrote:
>> Axis autoscaling works but gives wrong ans?
>> Henry
> 
> ....
> 
>> octave:1> x=y = (0:10)';
>> octave:2> plot (x,y)        % will use default axis = autoscaling
>> octave:3> axis ([-1, 11, -1,11])
>> octave:4> replot            % will use axis ([-1, 11, -1,11])
> 
> No. The whole idea of 'replot' is that it repeats previous plot command
> with the same axis settings etc...
> If you instead repeat 'plot(x,y)' then you get the axis you specified.
> 
> Regards,
> 
> Dmitri.
> 
> 
> 
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
> 
> Octave's home on the web:  http://www.octave.org
> How to fund new projects:  http://www.octave.org/funding.html
> Subscription information:  http://www.octave.org/archive.html
> -------------------------------------------------------------



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]