<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650</link>
    <title>MATLAB Central Newsreader - export_fig: image resolution/size</title>
    <description>Feed for thread: export_fig: image resolution/size</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, 08 Oct 2009 18:20:19 -0400</pubDate>
      <title>export_fig: image resolution/size</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650#685747</link>
      <author>RUSSELL </author>
      <description>hi there&lt;br&gt;
&lt;br&gt;
I have finally managed to get my figures to have transparency via export_fig! yeee haaaa!&lt;br&gt;
for anyone wondering how this is done, i had to set :&lt;br&gt;
&lt;br&gt;
set(gca,'color','none')&lt;br&gt;
set(gcf,'color','none')&lt;br&gt;
&lt;br&gt;
and then&lt;br&gt;
&lt;br&gt;
export_fig('-png','-nocrop','-opengl','-r300','outputfilename')&lt;br&gt;
&lt;br&gt;
however, i cant seem to get the output image to change size in resolution and dimensions.  i have searched the help and forum extensively but nothing seems to work.&lt;br&gt;
&lt;br&gt;
I have tried things like:&lt;br&gt;
&lt;br&gt;
export_fig('PaperUnits','centimeters','PaperSize',[20. 20.],'-dpng','-nocrop','-opengl','-r2000','Testpng')&lt;br&gt;
&amp;nbsp;&lt;br&gt;
but nothing happens.. have also put the papersize command in the &lt;br&gt;
&lt;br&gt;
figure(...)  bit.&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
changing -r in the export_fig doesnt seem to do anything.. every time i open the output file its quite small and around 72dpi&lt;br&gt;
&lt;br&gt;
any suggestions would be great!!!!! &lt;br&gt;
&lt;br&gt;
cheers&lt;br&gt;
Russ&lt;br&gt;
&amp;nbsp;&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&amp;nbsp;</description>
    </item>
    <item>
      <pubDate>Thu, 08 Oct 2009 18:39:03 -0400</pubDate>
      <title>Re: export_fig: image resolution/size</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650#685754</link>
      <author>the cyclist</author>
      <description>&quot;RUSSELL &quot; &amp;lt;r.johnston@physics.gla.ac.uk&amp;gt; wrote in message &amp;lt;halah3$2ak$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; hi there&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have finally managed to get my figures to have transparency via export_fig! yeee haaaa!&lt;br&gt;
&amp;gt; for anyone wondering how this is done, i had to set :&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; set(gca,'color','none')&lt;br&gt;
&amp;gt; set(gcf,'color','none')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; and then&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; export_fig('-png','-nocrop','-opengl','-r300','outputfilename')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; however, i cant seem to get the output image to change size in resolution and dimensions.  i have searched the help and forum extensively but nothing seems to work.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have tried things like:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; export_fig('PaperUnits','centimeters','PaperSize',[20. 20.],'-dpng','-nocrop','-opengl','-r2000','Testpng')&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; but nothing happens.. have also put the papersize command in the &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; figure(...)  bit.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; changing -r in the export_fig doesnt seem to do anything.. every time i open the output file its quite small and around 72dpi&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; any suggestions would be great!!!!! &lt;br&gt;
&lt;br&gt;
I think you need to set the 'PaperPosition' attribute of the figure object.</description>
    </item>
    <item>
      <pubDate>Thu, 08 Oct 2009 19:02:02 -0400</pubDate>
      <title>Re: export_fig: image resolution/size</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650#685762</link>
      <author>RUSSELL </author>
      <description>&quot;the cyclist&quot; &amp;lt;thecyclist+mathworks_newsgroup@gmail.com&amp;gt; wrote in message &amp;lt;halbk7$gjj$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; &quot;RUSSELL &quot; &amp;lt;r.johnston@physics.gla.ac.uk&amp;gt; wrote in message &amp;lt;halah3$2ak$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&lt;br&gt;
&amp;gt; I think you need to set the 'PaperPosition' attribute of the figure object.&lt;br&gt;
&lt;br&gt;
do you mean:&lt;br&gt;
&lt;br&gt;
figure1=figure('paperunits','centimeters','paperposition', [0 0 20 20]);&lt;br&gt;
&lt;br&gt;
if so, nothing changes </description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 08:36:02 -0400</pubDate>
      <title>Re: export_fig: image resolution/size</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650#685878</link>
      <author>Oliver Woodford</author>
      <description>Hi Russ&lt;br&gt;
&lt;br&gt;
export_fig doesn't take all the options that print does. I'm considering adding in the ability to increase resolution with an input parameter, but at the moment that feature isn't available.&lt;br&gt;
&lt;br&gt;
However, as stated in the help text, export_fig exports figures exactly as they appear on screen - that includes the size. If you want a larger (i.e. higher resolution) image, make the figure larger.&lt;br&gt;
&lt;br&gt;
HTH,&lt;br&gt;
Oliver&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;RUSSELL &quot; &amp;lt;r.johnston@physics.gla.ac.uk&amp;gt; wrote in message &amp;lt;halah3$2ak$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; hi there&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have finally managed to get my figures to have transparency via export_fig! yeee haaaa!&lt;br&gt;
&amp;gt; for anyone wondering how this is done, i had to set :&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; set(gca,'color','none')&lt;br&gt;
&amp;gt; set(gcf,'color','none')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; and then&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; export_fig('-png','-nocrop','-opengl','-r300','outputfilename')&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; however, i cant seem to get the output image to change size in resolution and dimensions.  i have searched the help and forum extensively but nothing seems to work.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; I have tried things like:&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; export_fig('PaperUnits','centimeters','PaperSize',[20. 20.],'-dpng','-nocrop','-opengl','-r2000','Testpng')&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; but nothing happens.. have also put the papersize command in the &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; figure(...)  bit.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; changing -r in the export_fig doesnt seem to do anything.. every time i open the output file its quite small and around 72dpi&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; any suggestions would be great!!!!! &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; cheers&lt;br&gt;
&amp;gt; Russ&lt;br&gt;
&amp;gt;  &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt;  </description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 10:02:02 -0400</pubDate>
      <title>Re: export_fig: image resolution/size</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650#685901</link>
      <author>Oliver Woodford</author>
      <description>&quot;Oliver Woodford&quot; wrote:&lt;br&gt;
&amp;gt; export_fig doesn't take all the options that print does. I'm considering adding in the ability to increase resolution with an input parameter, but at the moment that feature isn't available.&lt;br&gt;
&lt;br&gt;
Hold the phone. I've just added the ability to export bitmaps at an arbitrary resolution, and uploaded it to the FEX. It should appear within the next few days.&lt;br&gt;
&lt;br&gt;
The resolution is changed with the -m&amp;lt;value&amp;gt; option (not the -r&amp;lt;value&amp;gt; option used by print), where value is the factor to magnify the on-screen figure dimensions by. I.e. -m2.5 produces a bitmap with 2.5 times the resolution of the source figure. Hopefully this is more intuitive than dpi.&lt;br&gt;
&lt;br&gt;
Oliver</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 13:28:02 -0400</pubDate>
      <title>Re: export_fig: image resolution/size</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650#685960</link>
      <author>RUSSELL </author>
      <description>&quot;Oliver Woodford&quot; &amp;lt;o.j.woodford.98@cantab.net&amp;gt; wrote in message &amp;lt;hamsli$r8t$1@fred.mathworks.com&amp;gt;...&lt;br&gt;
&amp;gt; Hi Russ&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; export_fig doesn't take all the options that print does. I'm considering adding in the ability to increase resolution with an input parameter, but at the moment that feature isn't available.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; However, as stated in the help text, export_fig exports figures exactly as they appear on screen - that includes the size. If you want a larger (i.e. higher resolution) image, make the figure larger.&lt;br&gt;
&amp;gt; &lt;br&gt;
&amp;gt; HTH,&lt;br&gt;
&amp;gt; Oliver&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Hi Oliver&lt;br&gt;
&lt;br&gt;
Thanks for taking the time to reply! :@) and i will most certainly checkout your extended bmp version when it appears!!&lt;br&gt;
&lt;br&gt;
Ok, one last stupid question...(as you will have guessed, i am new to this):&lt;br&gt;
&lt;br&gt;
Lets say, for example, that i plot the figure to the screen (which i have been doing).  it will always appear small unless i physically drag the corner tab of the window to make it bigger or if i select 'Figure Properties', at whcih point it jumps to a huge square size on the screen.  &lt;br&gt;
&lt;br&gt;
From here, how do i use export_fig to export the figure at this new size?&lt;br&gt;
If i am talking absolute rubbish, then where exatly in the code do i state the figure size?&lt;br&gt;
&lt;br&gt;
Currently the code looks something like:&lt;br&gt;
--------------------&lt;br&gt;
figure1=figure;&lt;br&gt;
axes1 = axes('Parent',figure1,'FontWeight','bold','FontSize',16);&lt;br&gt;
set(gca,'color','none')&lt;br&gt;
set(gcf,'color','none')&lt;br&gt;
xlim([0 360]);&lt;br&gt;
ylim([-100 100]);&lt;br&gt;
box('on');&lt;br&gt;
hold('all');&lt;br&gt;
xlabel({'Right Ascension (DD)'},'FontWeight','demi','FontSize',20,'FontName','Times',...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'FontAngle','normal');&lt;br&gt;
ylabel({'Declination (DD)'},'FontWeight','demi','FontSize',20,'FontName','Times',...&lt;br&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'FontAngle','normal');&lt;br&gt;
&lt;br&gt;
plot(raSIXDF,decSIXDF,'MarkerSize',2,'Marker','.','Color',[.49 1 .63],'LineStyle','none');&lt;br&gt;
&lt;br&gt;
export_fig('-dpng','-nocrop','-opengl','-r200','Test')&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
------------------&lt;br&gt;
&lt;br&gt;
many thanks (in advance)&lt;br&gt;
&lt;br&gt;
Russ</description>
    </item>
    <item>
      <pubDate>Fri, 09 Oct 2009 13:36:03 -0400</pubDate>
      <title>Re: export_fig: image resolution/size</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/262650#685964</link>
      <author>RUSSELL </author>
      <description>&lt;br&gt;
HI Oliver&lt;br&gt;
&lt;br&gt;
Ignore that last message i posted... i figured it out!! duh!&lt;br&gt;
&lt;br&gt;
by the way - you're script is great!&lt;br&gt;
&lt;br&gt;
cheers</description>
    </item>
  </channel>
</rss>

