<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel> 

	<title>Comments on: crop matlab plots</title>
	<link>http://ask.metafilter.com/106174/crop-matlab-plots/</link>
	<description>Comments on Ask MetaFilter post crop matlab plots</description>
	<pubDate>Thu, 06 Nov 2008 19:26:00 -0800</pubDate>
	<lastBuildDate>Thu, 06 Nov 2008 19:26:00 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: crop matlab plots</title>
		<link>http://ask.metafilter.com/106174/crop-matlab-plots</link>	
		<description>How can I automatically crop the whitespace in Matlab plots pasted into Word? &lt;br /&gt;&lt;br /&gt; I find a not insignificant portion of my time in report writing is spent cropping the extra whitespace around Matlab plots that are pasted into Word. Is there some way to eliminate the whitespace automatically, either with some nifty Word trick or by forcing Matlab to generate windows without so much whitespace around the plot? Thanks.</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2008:site.106174</guid>
		<pubDate>Thu, 06 Nov 2008 17:18:10 -0800</pubDate>
		<dc:creator>pravit</dc:creator>
		
			<category>matlab</category>
		
			<category>plots</category>
		
			<category>whitespace</category>
		
			<category>word</category>
		
			<category>cropping</category>
		
	</item> <item>
		<title>By: onalark</title>
		<link>http://ask.metafilter.com/106174/crop-matlab-plots#1532174</link>	
		<description>You &lt;em&gt;could&lt;/em&gt; change the &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/creating_plots/f3-84337.html#f3-99723&quot;&gt;default page size&lt;/a&gt; that MATLAB uses for output to something more reasonable for your images.  In MATLAB, printing and saving to file are pretty much the same thing, so when a figure is saved to file, it is effectively saved as if it was pasted onto an 8.5&quot;x11&quot; by default.  You may want to use code generation to simplify repeating the process once you&apos;ve got your figures sized correctly for cutting and pasting.&lt;br&gt;
&lt;br&gt;
You might also want to consider using the &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/f6-14058.html&quot;&gt;Publish&lt;/a&gt; or &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/access/helpdesk/help/techdoc/matlab_env/brgbdq1-43.html&amp;http://www.mathworks.com/access/helpdesk/help/techdoc/matlab_env/brgbdq1-1.html&quot;&gt;Notebook&lt;/a&gt; features of MATLAB to do what you want.&lt;br&gt;
&lt;br&gt;
Personally, for short reports Publish does everything I want.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.106174-1532174</guid>
		<pubDate>Thu, 06 Nov 2008 19:26:00 -0800</pubDate>
		<dc:creator>onalark</dc:creator>
	</item><item>
		<title>By: chrisamiller</title>
		<link>http://ask.metafilter.com/106174/crop-matlab-plots#1532351</link>	
		<description>I&apos;m reasonably sure that Matlab can export plots in various image formats.  Set your scripts up to do that, then use ImageMagick on the command line to crop them all at once.  (assuming the whitespace area is constant)&lt;br&gt;
&lt;br&gt;
Something like : &lt;br&gt;
&lt;pre&gt;convert -crop 200x100+300+400 plot.jpg plot_cropped.jpg&lt;/pre&gt;&lt;a href=&quot;http://www.geom.uiuc.edu/events/courses/1996/cmwh/Stills/manipulating.html#Cropping&quot;&gt;See also&lt;/a&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.106174-1532351</guid>
		<pubDate>Thu, 06 Nov 2008 23:15:51 -0800</pubDate>
		<dc:creator>chrisamiller</dc:creator>
	</item><item>
		<title>By: fatllama</title>
		<link>http://ask.metafilter.com/106174/crop-matlab-plots#1532363</link>	
		<description>Export from MATLAB as PDF;  Acrobat has a &lt;i&gt;Trim&lt;/i&gt; menu item that removes all whitespace.  Many other graphics programs have similar.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.106174-1532363</guid>
		<pubDate>Thu, 06 Nov 2008 23:33:25 -0800</pubDate>
		<dc:creator>fatllama</dc:creator>
	</item><item>
		<title>By: dmd</title>
		<link>http://ask.metafilter.com/106174/crop-matlab-plots#1532491</link>	
		<description>I&apos;ve never actually had this problem, which makes me wonder exactly what you are doing to cause it.&lt;br&gt;
&lt;br&gt;
Can you describe how you move stuff from Matlab to Word?&lt;br&gt;
&lt;br&gt;
I would do this:&lt;br&gt;
&lt;br&gt;
&lt;code&gt;&lt;br&gt;
&amp;gt; print -dpng figurename&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;br&gt;
And then drag the png into Word.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.106174-1532491</guid>
		<pubDate>Fri, 07 Nov 2008 06:16:41 -0800</pubDate>
		<dc:creator>dmd</dc:creator>
	</item><item>
		<title>By: caution live frogs</title>
		<link>http://ask.metafilter.com/106174/crop-matlab-plots#1532515</link>	
		<description>Listen to fatllama. You&apos;re generating nice vector graphics - why are you dumping them as resolution-dependent images? Matlab will export them as vector, either PDF or postscript.&lt;br&gt;
&lt;br&gt;
Also, don&apos;t just paste images into Word. Use the &quot;Insert --&amp;gt; Image from File&quot; command. Yes, it&apos;s slightly more of a pain, but it actually does something different than pasting does.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.106174-1532515</guid>
		<pubDate>Fri, 07 Nov 2008 06:43:39 -0800</pubDate>
		<dc:creator>caution live frogs</dc:creator>
	</item><item>
		<title>By: pravit</title>
		<link>http://ask.metafilter.com/106174/crop-matlab-plots#1533410</link>	
		<description>&lt;em&gt;Can you describe how you move stuff from Matlab to Word?&lt;/em&gt;&lt;br&gt;
&lt;br&gt;
In the plot window, I go to Edit-&amp;gt;Copy Figure, then I paste it straight into Word. For what it&apos;s worth, it does convert it to vector graphics when I paste it, it just has this whitespace around it which makes it kind of difficult when I want to try to resize two plots to fit on the same page, for example.&lt;br&gt;
&lt;br&gt;
Here&apos;s a &lt;a href=&quot;http://i194.photobucket.com/albums/z251/pravit726/whitespace.jpg&quot;&gt;screenshot&lt;/a&gt; of what I mean - notice the extra white space around the top and bottom of the plot.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2008:site.106174-1533410</guid>
		<pubDate>Fri, 07 Nov 2008 21:46:50 -0800</pubDate>
		<dc:creator>pravit</dc:creator>
	</item>
	</channel>
</rss>
