[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tests in log-scale plots
From: |
Ben Abbott |
Subject: |
Re: tests in log-scale plots |
Date: |
Tue, 06 Sep 2011 20:30:41 -0400 |
On Sep 6, 2011, at 8:48 AM, Carlo de Falco wrote:
> %!test
> %! a = logspace (-5, 1, 10);
> %! b =-logspace (-5, 1, 10);
> %! loglog (a, b)
>
> catches a bug occurring in all the functions semilogx/semilogy/loglog in
> octave <http://savannah.gnu.org/bugs/?33249>,
> while in matlab it is (almost) equivalent to
>
> loglog (a, abs(b), 'ydir', 'reverse')
> set (gca, 'ydir', 'reverse')
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.
>> a = logspace (-5, 1, 10);
>> b =-logspace (-5, 1, 10);
>> loglog(a,b)
>> get (gca, 'ydir')
ans =
normal
>> get (gca, 'ytick')
ans =
-10.0000 -1.0000 -0.1000 -0.0100 -0.0010 -0.0001 -0.0000
>> get (gca, 'yticklabel')
ans =
1
0
-1
-2
-3
-4
-5
Ben
loglog-demo-2.pdf
Description: Adobe PDF document
tests in log-scale plots, John W. Eaton, 2011/09/06
Re: tests in log-scale plots,
Ben Abbott <=
- Re: tests in log-scale plots, c., 2011/09/07
- Re: tests in log-scale plots, bpabbott, 2011/09/07
- Re: tests in log-scale plots, c., 2011/09/07
- Re: tests in log-scale plots, bpabbott, 2011/09/07
- Re: tests in log-scale plots, Ben Abbott, 2011/09/10
- Re: tests in log-scale plots, Ben Abbott, 2011/09/11