octave-maintainers
[Top][All Lists]
Advanced

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

Re: tests in log-scale plots


From: bpabbott
Subject: Re: tests in log-scale plots
Date: Wed, 07 Sep 2011 11:44:22 +0000 (GMT)

On Sep 07, 2011, at 03:43 AM, "c." <address@hidden> wrote:


On 7 Sep 2011, at 02:30, Ben Abbott wrote:

> Just for clarity, I ran this in Matlab and attached a plot (loglog-demo-2.dpf).
> I noticed that 'ydir', isn't reversed. Instead Matlab made some bizarre choices.

on my system with matlab 2007b I see the plot in the attache screenshot,
the y axis is indeed reversed.

the plot in figure 1 (right) is obtained by

a = logspace (-5, 1, 10);
b =-logspace (-5, 1, 10);
loglog (a, b)

the plot in figure 2 (left) by

loglog (a, abs(b))
set (gca, 'ydir', 'reverse')

to me they look the same except for the sign of the yticklabels, don't they?

> get (gca, 'ytick')

> ans =
> -10.0000 -1.0000 -0.1000 -0.0100 -0.0010 -0.0001 -0.0000

so it seems the ytick labels are consistent with the y tick values.

c.
 
Carlo, what is the value for the 'ydir' property after the "loglog(a,b)" plot?

Is is actually reversed in 2007b? Since -10 < -1, I expect the setting of ydir is still normal.

Ben




reply via email to

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