<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173100</link>
    <title>MATLAB Central Newsreader - Plotting in Matlab -- Help please..</title>
    <description>Feed for thread: Plotting in Matlab -- Help please..</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>Wed, 23 Jul 2008 13:39:02 -0400</pubDate>
      <title>Plotting in Matlab -- Help please..</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173100#444867</link>
      <author>Naveen </author>
      <description>Hi, I am trying to plot a bunch of graphs in matlab &lt;br&gt;
(subplots actually) and then create a pdf file. My data &lt;br&gt;
file is in excel, first column - dates, and all other &lt;br&gt;
columns data series. So, i have to plot each of the data &lt;br&gt;
series columns against the dates column. I am trying to &lt;br&gt;
have 4 plots per figure. I am having 2 issues here.&lt;br&gt;
&lt;br&gt;
1. I am able to generate the plots, but the x-axis dates &lt;br&gt;
scale is messed up. I am trying to show x-axis dates in 90 &lt;br&gt;
day i-e 3 month time intervals of a 2 year rolling data &lt;br&gt;
series. The plots doesn't come out the way you would  &lt;br&gt;
normally see in excel. It looks like the plot assumes the &lt;br&gt;
data series begins at the beginning of a specific month, &lt;br&gt;
for instance if the data series is from 7/22/06 to &lt;br&gt;
7/22/08, the it assumes that the series should start on &lt;br&gt;
7/1/06 (so leaves some blanks at the beginning in the &lt;br&gt;
plot) and makes some funky assumptions at the end of the &lt;br&gt;
series as well. So, net-net the dates are messed up on the &lt;br&gt;
x-axis. &lt;br&gt;
&lt;br&gt;
2. I am saving all the plots (4 each on one figure) using &lt;br&gt;
a figs() which has all the figures. &lt;br&gt;
&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;for i=1:length(figs)&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;print(figs(i),'-append','-dpdf','-r600','-&lt;br&gt;
painters','test.pdf');&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;end&lt;br&gt;
&lt;br&gt;
I like to print them into a PDF file. But it is not &lt;br&gt;
working. Only the final figure with 4 subplots is coming &lt;br&gt;
out in the PDF file. Some how the prior figures are all &lt;br&gt;
being overwritten. &lt;br&gt;
&lt;br&gt;
Sincerely appreciate your help.&lt;br&gt;
&lt;br&gt;
Best,&lt;br&gt;
Naveen&lt;br&gt;
&lt;br&gt;
dates -- has the column of dates&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;subplot(2,2,i);&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;plot(dates(:,1),data(:,i));&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set(gca, 'XTickLabel', datestr(dates(1:60:length&lt;br&gt;
(dates)),'mmm-yy'));</description>
    </item>
  </channel>
</rss>

