Path: news.mathworks.com!not-for-mail
From: "pietro " <bracardi82@email.it>
Newsgroups: comp.soft-sys.matlab
Subject: Re: all axis tick labels with the same digits
Date: Thu, 30 Jul 2009 11:13:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 39
Message-ID: <h4rv7t$mlk$1@fred.mathworks.com>
References: <h4p9q8$bcu$1@fred.mathworks.com> <h4patp$mu3$1@fred.mathworks.com> <h4pdki$e5b$1@fred.mathworks.com> <h4pith$kl4$1@fred.mathworks.com>
Reply-To: "pietro " <bracardi82@email.it>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248952381 23220 172.30.248.38 (30 Jul 2009 11:13:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 30 Jul 2009 11:13:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1184971
Xref: news.mathworks.com comp.soft-sys.matlab:559576


"Steven Lord" <slord@mathworks.com> wrote in message <h4pith$kl4$1@fred.mathworks.com>...
> 
> "pietro " <bracardi82@email.it> wrote in message 
> news:h4pdki$e5b$1@fred.mathworks.com...
> > "Wayne King" <wmkingty@gmail.com> wrote in message 
> > <h4patp$mu3$1@fred.mathworks.com>...
> >> Hi Pietro, How about
> >>
> >> x=[0 0.05 0.1 0.15 0.2];
> >> y=3*x;
> >> plot(x,y)
> >> set(gca,'xticklabel',{'0.00' '0.05' '0.10' '0.15' '0.20'});
> >>
> >> Wayne
> >>
> >> "pietro " <bracardi82@email.it> wrote in message 
> >> <h4p9q8$bcu$1@fred.mathworks.com>...
> >> > How can i have axis tick labels with the same digit? instead [0 0.05 
> >> > 0.1 0.15 0.2] i would like [0.00 0.05 0.10 0.15 0.20]
> >> > thank you in advance
> >
> > i have too many and different graphs to do like this. Isn't there a 
> > function or a axis property?
> 
> Since I'm guessing you're objecting to the manual way Wayne constructed the 
> tick label cell array, you can automate the formatting of the labels if the 
> format you want is possible using the formatting specification in SPRINTF:
> 
> x=[0 0.05 0.1 0.15 0.2];
> y=3*x;
> plot(x,y)
> set(gca, 'XTick', x, 'XTickLabel', sprintf('%0.2f|', x));
> 
> -- 
> Steve Lord
> slord@mathworks.com 
> 
thank you very much, i was finding that.
bye