<?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: printing matlab figures to memory</title>
	<link>http://ask.metafilter.com/49638/printing-matlab-figures-to-memory/</link>
	<description>Comments on Ask MetaFilter post printing matlab figures to memory</description>
	<pubDate>Sat, 28 Oct 2006 12:14:40 -0800</pubDate>
	<lastBuildDate>Sat, 28 Oct 2006 12:14:40 -0800</lastBuildDate>
	<language>en-us</language>
	<docs>http://blogs.law.harvard.edu/tech/rss</docs>
	<ttl>60</ttl>

	<item>
		<title>Question: printing matlab figures to memory</title>
		<link>http://ask.metafilter.com/49638/printing-matlab-figures-to-memory</link>	
		<description>MatLabFilter: Printing figures to memory?  I know that I can use the versatile print command to print a figure to a file.  But how might I be able to turn a figure into a matrix in matlab&apos;s memory?   &lt;br /&gt;&lt;br /&gt; previously I&apos;ve printed figures to files then opened those files into memory but this seems like a horrible kludge.  any way to turn an onscreen figure directly into a matrix?  specifically I&apos;m interested in creating really busy figures using typical matlab handle graphics, but I&apos;d like to periodically flatten the figure into a matrix then add to it continually without bogging matlab down with a million graphic objects that would take an eternity to render.  any ideas?</description>
		<guid isPermaLink="false">post:ask.metafilter.com,2006:site.49638</guid>
		<pubDate>Sat, 28 Oct 2006 11:36:42 -0800</pubDate>
		<dc:creator>garethspor</dc:creator>
		
			<category>matlab</category>
		
			<category>programming</category>
		
			<category>graphics</category>
		
	</item> <item>
		<title>By: yarmond</title>
		<link>http://ask.metafilter.com/49638/printing-matlab-figures-to-memory#753917</link>	
		<description>The &lt;code&gt;getframe&lt;/code&gt; command will give you a matrix of the current axes. If you want the entire figure area, you&apos;ll want to do something like:&lt;br&gt;
&lt;code&gt;&lt;br&gt;
pos = get(gcf,&apos;Position&apos;);&lt;br&gt;
I= getframe(gcf,[0 0 pos(3) pos(4)]);&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
And then to plot the image on the (new) axes,&lt;br&gt;
&lt;code&gt;&lt;br&gt;
image(I.cdata)&lt;br&gt;
set(gca,&apos;Position&apos;,[0 0 1 1])&lt;br&gt;
axis off&lt;br&gt;
&lt;/code&gt;</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.49638-753917</guid>
		<pubDate>Sat, 28 Oct 2006 12:14:40 -0800</pubDate>
		<dc:creator>yarmond</dc:creator>
	</item><item>
		<title>By: metaculpa</title>
		<link>http://ask.metafilter.com/49638/printing-matlab-figures-to-memory#754095</link>	
		<description>I believe Matlab will wait until it sees a Drawnow, or you otherwise trigger a Drawnow, to render the plot.  So if you can avoid pause, getframe, figure, drawnow, or returning to the command line while you&apos;re plotting everything, then it will only have to render once.  Of course, this doesn&apos;t solve any memory issues, just the time issue.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.49638-754095</guid>
		<pubDate>Sat, 28 Oct 2006 17:38:08 -0800</pubDate>
		<dc:creator>metaculpa</dc:creator>
	</item><item>
		<title>By: metaculpa</title>
		<link>http://ask.metafilter.com/49638/printing-matlab-figures-to-memory#754096</link>	
		<description>I meant to say, as well: see &lt;a href=&quot;http://www.mathworks.com/access/helpdesk/help/techdoc/ref/index.html?/access/helpdesk/help/techdoc/ref/drawnow.html&quot;&gt;here&lt;/a&gt;.</description>
		<guid isPermaLink="false">comment:ask.metafilter.com,2006:site.49638-754096</guid>
		<pubDate>Sat, 28 Oct 2006 17:38:35 -0800</pubDate>
		<dc:creator>metaculpa</dc:creator>
	</item>
	</channel>
</rss>
