Path: news.mathworks.com!not-for-mail
From: "Pekka " <pekka.nospam.kumpulainen@tut.please.fi>
Newsgroups: comp.soft-sys.matlab
Subject: Re: X axis format in R2007b
Date: Thu, 31 Jan 2008 13:52:01 +0000 (UTC)
Organization: Tampere University of Technology
Lines: 24
Message-ID: <fnsjq1$rht$1@fred.mathworks.com>
References: <fnsdfi$ita$1@fred.mathworks.com>
Reply-To: "Pekka " <pekka.nospam.kumpulainen@tut.please.fi>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1201787521 28221 172.30.248.37 (31 Jan 2008 13:52:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 31 Jan 2008 13:52:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 218565
Xref: news.mathworks.com comp.soft-sys.matlab:448538



"Anish Goorah" <anish.goorah@gmail.com> wrote in message 
<fnsdfi$ita$1@fred.mathworks.com>...
> I have a year vector which runs from [19974:20064] and i
> plot it with another return vector with the following 
command:
> 
> plot(year,return)
> 
> It works fine except that when it is displaying the plot 
it
> shows the numbers in standard form on teh x-axis, i.e. it
> shows 1.97*10^4, 1.98*10^4 etc. How do i just switch it 
back
> to 19974 as to mean Q4 in 1997? It's the first time I have
> had this issue in matlab....
> 
> Thanks

You can manually set the XTickLabel property of the axis.
If the XTick positions are ok, then one possibility would be
set(gca,'XTickLabel',int2str(get(gca,'XTick')'))

See documentation: Handle Graphics Objects
for further tweaking