<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154969</link>
    <title>MATLAB Central Newsreader - Problem constraining dimensions in figure saved as eps</title>
    <description>Feed for thread: Problem constraining dimensions in figure saved as eps</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, 22 Aug 2007 20:59:14 -0400</pubDate>
      <title>Problem constraining dimensions in figure saved as eps</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154969#388846</link>
      <author>First Last</author>
      <description>Yet another saving, plotting question ... &lt;br&gt;
&lt;br&gt;
If I have a plot that I've meticulously set the bounds for using&lt;br&gt;
&lt;br&gt;
the gca and gcf property 'Position',&lt;br&gt;
&lt;br&gt;
I can save the .fig file within a script/function using:&lt;br&gt;
&lt;br&gt;
saveas(gcf,outputFigureName,'fig');&lt;br&gt;
&lt;br&gt;
and it looks like it is supposed to. However, when I&lt;br&gt;
similarly try to save an encapsulated postscript file using&lt;br&gt;
either:&lt;br&gt;
&lt;br&gt;
saveas(gcf,outputFigureName,'eps');&lt;br&gt;
&lt;br&gt;
or&lt;br&gt;
&lt;br&gt;
print(gcf,'-depsc',outputFigureName);&lt;br&gt;
&lt;br&gt;
the page dimensions are messed up and the figures are not&lt;br&gt;
where I set them as seen in the fig file.&lt;br&gt;
&lt;br&gt;
However, if I go to the saveas command manually in the menu&lt;br&gt;
of the open .fig file, that saves the dimensions very nicely. &lt;br&gt;
&lt;br&gt;
I have seen the same problem with .png files as well.&lt;br&gt;
&lt;br&gt;
How can I get the functional form of saveas (or print) to&lt;br&gt;
behave with saving eps files? &lt;br&gt;
&lt;br&gt;
Thanks ... </description>
    </item>
    <item>
      <pubDate>Wed, 22 Aug 2007 22:29:42 -0400</pubDate>
      <title>Re: Problem constraining dimensions in figure saved as eps</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154969#388860</link>
      <author>First Last</author>
      <description>Strangely, the issue is 'resolved' when I simply use &lt;br&gt;
&lt;br&gt;
axis square&lt;br&gt;
&lt;br&gt;
to constrain the dimensions of the figure and subsequently&lt;br&gt;
use one of the aforementioned 'print' or 'saveas' commands.&lt;br&gt;
However there should still be a resolution to the previous&lt;br&gt;
scenario. &lt;br&gt;
&lt;br&gt;
Thanks,</description>
    </item>
    <item>
      <pubDate>Wed, 22 Aug 2007 23:14:59 -0400</pubDate>
      <title>Re: Problem constraining dimensions in figure saved as eps</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154969#388866</link>
      <author>Sebastian H&#246;lz</author>
      <description>I would try to change the &quot;papaperposition&quot;-property of the&lt;br&gt;
figure, so that it resembles the &quot;position&quot;-property. Take a&lt;br&gt;
look at the help to see the difference.&lt;br&gt;
&lt;br&gt;
Sebastian</description>
    </item>
    <item>
      <pubDate>Thu, 23 Aug 2007 13:27:54 -0400</pubDate>
      <title>Re: Problem constraining dimensions in figure saved as eps</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/154969#388996</link>
      <author>Gautam Vallabha</author>
      <description>In article &amp;lt;fai832$4jm$1@fred.mathworks.com&amp;gt;, nospam@nospamplease.com &lt;br&gt;
&amp;gt; I can save the .fig file within a script/function using:&lt;br&gt;
&amp;gt; saveas(gcf,outputFigureName,'fig');&lt;br&gt;
&amp;gt; and it looks like it is supposed to. However, when I&lt;br&gt;
&amp;gt; similarly try to save an encapsulated postscript file using&lt;br&gt;
&amp;gt; either:&lt;br&gt;
&amp;gt; saveas(gcf,outputFigureName,'eps');&lt;br&gt;
&amp;gt; or&lt;br&gt;
&amp;gt; print(gcf,'-depsc',outputFigureName);&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; the page dimensions are messed up and the figures are not&lt;br&gt;
&amp;gt; where I set them as seen in the fig file.&lt;br&gt;
&lt;br&gt;
When using &quot;print -deps&quot; and other options, you can adjust how the &lt;br&gt;
figure should look on paper (e.g., if you want it to be tall and thin, &lt;br&gt;
or short and wide).&lt;br&gt;
&lt;br&gt;
1) Open the figure, then choose File -&amp;gt; Print Preview ..., and position &lt;br&gt;
the size and location of the figure. (you can get the same dialog box by &lt;br&gt;
typing 'printpreview').&lt;br&gt;
&lt;br&gt;
2) After adjusting the position and size, note down the values &lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;&amp;gt; get(gcf,'paperposition')&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;ans =&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;1.0000    4.7500    4.0000    3.7500&lt;br&gt;
&lt;br&gt;
3) Specify those values when creating the figure&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;gt;&amp;gt; figure('paperposition', [1.0 4.75 4.0 3.75]);&lt;br&gt;
&lt;br&gt;
Then, when you say print -deps, the figure will come out sized &lt;br&gt;
appropriately. &lt;br&gt;
&lt;br&gt;
-- &lt;br&gt;
Gautam Vallabha&lt;br&gt;
The MathWorks&lt;br&gt;
Gautam.Vallabha@mathworks.com</description>
    </item>
  </channel>
</rss>

