<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245098</link>
    <title>MATLAB Central Newsreader - Figure format (tick marks) changed when using print -depsc</title>
    <description>Feed for thread: Figure format (tick marks) changed when using print -depsc</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>Sun, 22 Feb 2009 23:05:30 -0500</pubDate>
      <title>Figure format (tick marks) changed when using print -depsc</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245098#630062</link>
      <author>giordano.sagredo@gmail.com</author>
      <description>I made a 3-d figure using scatter3(x,y,z).&lt;br&gt;
&lt;br&gt;
Then, changed the tickmarks using:&lt;br&gt;
set(gca,'XTickLabel',num2str([-axlims:2:axlims]'))&lt;br&gt;
set(gca,'YTickLabel',num2str([-axlims:2:axlims]'))&lt;br&gt;
set(gca,'ZTickLabel',num2str([-axlims:2:axlims]'))&lt;br&gt;
&lt;br&gt;
It looks gorgeous, perfectly fine in the figure on my screen. Then when I save to eps using:&lt;br&gt;
print -depsc foo&lt;br&gt;
&lt;br&gt;
It ends up changing the tick marks on the Z-axis so they are every single unit, not every two as specified in my command line code (and as appeared just fine in my figure).&lt;br&gt;
&lt;br&gt;
Help please?</description>
    </item>
    <item>
      <pubDate>Mon, 23 Feb 2009 13:13:25 -0500</pubDate>
      <title>Re: Figure format (tick marks) changed when using print -depsc</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245098#630179</link>
      <author>Richard Quist</author>
      <description>giordano.sagredo@gmail.com wrote:&lt;br&gt;
&amp;gt; I made a 3-d figure using scatter3(x,y,z).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Then, changed the tickmarks using:&lt;br&gt;
&amp;gt; set(gca,'XTickLabel',num2str([-axlims:2:axlims]'))&lt;br&gt;
&amp;gt; set(gca,'YTickLabel',num2str([-axlims:2:axlims]'))&lt;br&gt;
&amp;gt; set(gca,'ZTickLabel',num2str([-axlims:2:axlims]'))&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It looks gorgeous, perfectly fine in the figure on my screen. Then when I save to eps using:&lt;br&gt;
&amp;gt; print -depsc foo&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; It ends up changing the tick marks on the Z-axis so they are every single unit, not every two as specified in my command line code (and as appeared just fine in my figure).&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; Help please?&lt;br&gt;
By default the figure is resized when printed/saved, and this is probably &lt;br&gt;
what's causing your issue. Assuming fig is the handle to your figure:&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;set(fig, 'PaperPositionMode', 'auto');&lt;br&gt;
will tell MATLAB to generate output for the figure at the same size as the &lt;br&gt;
onscreen figure.&lt;br&gt;
&lt;br&gt;
You may also need to set the axes XTickMode, YTickMode, and ZTickMode &lt;br&gt;
properties to 'manual'.&lt;br&gt;
&lt;br&gt;
Hope that helps.&lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
&lt;br&gt;
Richard Quist&lt;br&gt;
Software Developer&lt;br&gt;
The MathWorks, Inc.</description>
    </item>
    <item>
      <pubDate>Mon, 23 Feb 2009 14:20:04 -0500</pubDate>
      <title>Re: Figure format (tick marks) changed when using print -depsc</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/245098#630196</link>
      <author>giordano.sagredo@gmail.com</author>
      <description>Richard Quist suggested:&lt;br&gt;
&amp;gt;set(fig, 'PaperPositionMode', 'auto');&lt;br&gt;
&amp;gt;will tell MATLAB to generate output for the figure at the &amp;gt;same size as the onscreen figure.&lt;br&gt;
&lt;br&gt;
Thank you very much, Richard. That did the trick! Yippee!</description>
    </item>
  </channel>
</rss>

