help-octave
[Top][All Lists]
Advanced

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

Re: How to plot withou y-axis labels?


From: Miquel Cabanas
Subject: Re: How to plot withou y-axis labels?
Date: Fri, 29 Sep 2006 13:52:44 +0200

hi,

On Fri, 2006-09-29 at 01:04 -0500, jian Xu wrote:
> Hi,
> I'd like to make a plot without any y-axis labels, how can I do that?  I 
> tried:
> 
> plot(sin(0:.1:2));
> tics('y',[0]);
> 
> But it doesn't work.  Can anyone tell me the way to erase the y-axis
> tics?  Thanks!

firstly, check "help tics". You will see that tics() takes three
parameters: the axis (x or y), the positions vector and the labels
vector. To clean up all tic marks you should have used,

tics('y', [0], [' ']);

where '0' could be replaced with anything. Use "tics('y')" to restore
the default tic marks. Beware that using "['']" as labels vector will
cause an error message.

Secondly, either reverse the commands order, i.e. run first all format
related commands and leave the plot() command to the end,

tics('y',[0], [' ']);
plot(sin(0:.1:2));

or use the replot() command to apply the changes made with format
related commands run after plotting the data,

plot(sin(0:.1:2));
tics('y',[0], [' ']);
replot;

hope this helps,

Miquel





reply via email to

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