yaxis labels with custom spacing

Matthias Brennwald matthias at brennwald.org
Thu Dec 20 12:17:04 CST 2007


On 20.12.2007, at 19:02, help-octave-request at octave.org wrote:
>
> Date: Thu, 20 Dec 2007 17:42:04 +0100
> From: Thomas Ilnseher <ilnseher at eit.uni-kl.de>
> Subject: yaxis labels with custom spacing
> To: help-octave at octave.org
> Message-ID: <1198168924.5538.26.camel at pcmik05.zmk.uni-kl.de>
> Content-Type: text/plain; charset=UTF-8
>
> I want to plot a bode diagram (phase)
>
> the x axis is logarithmic, and the y axis is linear, from -90? to  
> +90?.
>
> I do a axis([10, 1000000, 90, -90]);
> but the result is that the y-axis is labeled with: 80, 60, 40, 20,
> 0, ....
> It would be better if the axis was labeled like:
>
> 90 45 0 -45 -90. Is there any possibility to achieve that ?
>
> Thanks!

The following does the trick (I have Octave 2.9.18 with gnuplot 4.2  
on Mac OS X):

set (gca,'ytick',[-90 -45 0 45 90])


Hth,
Matthias


More information about the Help-octave mailing list