octave-maintainers
[Top][All Lists]
Advanced

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

Re: Scale problem using plot()


From: Ben Abbott
Subject: Re: Scale problem using plot()
Date: Mon, 25 Oct 2010 23:34:09 +0800

On Oct 25, 2010, at 11:15 PM, Michael D Godfrey wrote:

> On 10/25/2010 01:12 AM, Ben Abbott wrote:
>>  So, I think gnuplot and matlab are doing the what is intended (i.e. no bug) 
>> ... at least they seem to do the correct thing for this example.
>> 
> Maybe I was not clear:  I think that the axes are correct, but the first 
> yaxis point (56) should have its value
> shown like the others and like occurs in other cases.  The fact that matlab 
> gets this wrong is a clear
> bug in matlab which should not be implemented in Octave.  Anyone reading the 
> graph would like to
> know what the axis limits are.

octave:2> get (gca, 'ylim')
ans =

    60   140

Thus, the first axis position is 60, not 56.

>> The scaling of the axes is determined by the "xlim" and "ylim" property 
>> values. The values of the tickmarks aren't intended to serve that function.
> I am confused here.  When I execute: 
> set (gca (), "ytick", [56 70 84 98 112 126 140])
> the scales change appropriately.  Do I need to set  xlim and ylim separately?
> 
> Michael

When I do ...

> set (gca (), "ytick", [56 70 84 98 112 126 140])

The positions of the tick marks move from 60:10:140 to what is specified. 
However, the min and max y-axis values do not change.

To change the min/max x/y/z values for the plot box, the proper approach is to 
set the x/y/zlim property values.

Ben



reply via email to

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