<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162927</link>
    <title>MATLAB Central Newsreader - X axis format in R2007b</title>
    <description>Feed for thread: X axis format in R2007b</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Thu, 31 Jan 2008 12:04:02 -0500</pubDate>
      <title>X axis format in R2007b</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162927#412185</link>
      <author>Anish Goorah</author>
      <description>I have a year vector which runs from [19974:20064] and i&lt;br&gt;
plot it with another return vector with the following command:&lt;br&gt;
&lt;br&gt;
plot(year,return)&lt;br&gt;
&lt;br&gt;
It works fine except that when it is displaying the plot it&lt;br&gt;
shows the numbers in standard form on teh x-axis, i.e. it&lt;br&gt;
shows 1.97*10^4, 1.98*10^4 etc. How do i just switch it back&lt;br&gt;
to 19974 as to mean Q4 in 1997? It's the first time I have&lt;br&gt;
had this issue in matlab....&lt;br&gt;
&lt;br&gt;
Thanks</description>
    </item>
    <item>
      <pubDate>Thu, 31 Jan 2008 13:42:34 -0500</pubDate>
      <title>Re: X axis format in R2007b</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162927#412203</link>
      <author>marky</author>
      <description>Anish Goorah wrote:&lt;br&gt;
&amp;gt; I have a year vector which runs from [19974:20064] and i&lt;br&gt;
&amp;gt; plot it with another return vector with the following command:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; plot(year,return)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It works fine except that when it is displaying the plot it&lt;br&gt;
&amp;gt; shows the numbers in standard form on teh x-axis, i.e. it&lt;br&gt;
&amp;gt; shows 1.97*10^4, 1.98*10^4 etc. How do i just switch it back&lt;br&gt;
&amp;gt; to 19974 as to mean Q4 in 1997? It's the first time I have&lt;br&gt;
&amp;gt; had this issue in matlab....&lt;br&gt;
&lt;br&gt;
See the XTickLabel property of an axis. E.g.&lt;br&gt;
&lt;br&gt;
x = 1:16;&lt;br&gt;
l = repmat(1997:2000,4,1);&lt;br&gt;
l = num2str(l(:));&lt;br&gt;
l2 = repmat(['Q1';'Q2';'Q3';'Q4'],4,1);&lt;br&gt;
ll = [l,l2];&lt;br&gt;
y = sin(x);&lt;br&gt;
plot(x,y,'.')&lt;br&gt;
set(gca,'XTickLabel',ll)&lt;br&gt;
set(gca,'XTick',x)</description>
    </item>
    <item>
      <pubDate>Thu, 31 Jan 2008 13:52:01 -0500</pubDate>
      <title>Re: X axis format in R2007b</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162927#412205</link>
      <author>Pekka </author>
      <description>&quot;Anish Goorah&quot; &amp;lt;anish.goorah@gmail.com&amp;gt; wrote in message &lt;br&gt;
&amp;lt;fnsdfi$ita$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; I have a year vector which runs from [19974:20064] and i&lt;br&gt;
&amp;gt; plot it with another return vector with the following &lt;br&gt;
command:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; plot(year,return)&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It works fine except that when it is displaying the plot &lt;br&gt;
it&lt;br&gt;
&amp;gt; shows the numbers in standard form on teh x-axis, i.e. it&lt;br&gt;
&amp;gt; shows 1.97*10^4, 1.98*10^4 etc. How do i just switch it &lt;br&gt;
back&lt;br&gt;
&amp;gt; to 19974 as to mean Q4 in 1997? It's the first time I have&lt;br&gt;
&amp;gt; had this issue in matlab....&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Thanks&lt;br&gt;
&lt;br&gt;
You can manually set the XTickLabel property of the axis.&lt;br&gt;
If the XTick positions are ok, then one possibility would be&lt;br&gt;
set(gca,'XTickLabel',int2str(get(gca,'XTick')'))&lt;br&gt;
&lt;br&gt;
See documentation: Handle Graphics Objects&lt;br&gt;
for further tweaking</description>
    </item>
    <item>
      <pubDate>Thu, 31 Jan 2008 14:22:16 -0500</pubDate>
      <title>Re: X axis format in R2007b</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/162927#412216</link>
      <author>Steven Lord</author>
      <description>&lt;br&gt;
&quot;Anish Goorah&quot; &amp;lt;anish.goorah@gmail.com&amp;gt; wrote in message &lt;br&gt;
news:fnsdfi$ita$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;I have a year vector which runs from [19974:20064] and i&lt;br&gt;
&amp;gt; plot it with another return vector with the following command:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; plot(year,return)&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; It works fine except that when it is displaying the plot it&lt;br&gt;
&amp;gt; shows the numbers in standard form on teh x-axis, i.e. it&lt;br&gt;
&amp;gt; shows 1.97*10^4, 1.98*10^4 etc. How do i just switch it back&lt;br&gt;
&amp;gt; to 19974 as to mean Q4 in 1997? It's the first time I have&lt;br&gt;
&amp;gt; had this issue in matlab....&lt;br&gt;
&lt;br&gt;
Do you specifically need your ticks in this format or would something like &lt;br&gt;
&quot;Q4-1997&quot; be acceptable?  If &quot;Q4-1997&quot; would be acceptable, look at HELP &lt;br&gt;
DATETICK:&lt;br&gt;
&lt;br&gt;
&lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/datetick.html&quot;&gt;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/datetick.html&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
Depending on the format of your original data, you may need to use DATENUM &lt;br&gt;
to convert your dates from QQ-YYYY format to serial date numbers, using the &lt;br&gt;
first day of each quarter instead of the number of the quarter.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Steve Lord&lt;br&gt;
slord@mathworks.com </description>
    </item>
  </channel>
</rss>

