MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Front End Memory usage while exporting many graphics

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55718] Re: Front End Memory usage while exporting many graphics
  • From: Bill Rowe <readnewsciv at earthlink.net>
  • Date: Mon, 4 Apr 2005 00:59:27 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 4/3/05 at 5:50 AM, gdelfino at gmail.com wrote:

>I want to create a large number of plots. I am using a setup
>similar to:

>Do[
>Export[ "/Users/Shared/"<>ToString[x]<>".eps", Plot[Sin[t], {t, 0,
>1}, DisplayFunction->Identity], "EPS"], {x, 1, 100000}
>]

>With this setup, the Mathematica Front End memory usage starts
>growing quickly until it crashes. If the front end is not
>displaying any of the plots, I don't understand why it keeps using
>more and more memory.

Whether displayed or not, the information needed to display the plot is still in memory. Every time through the loop another plot is created and more memory used.

>Is there a memory efficient way of doing this?

For the example above, yes. The following will do exactly the same as your code in much less memory and less time since the plot is only created once.

plota = Plot[Sin[t],{t, 0, 1}, DisplayFunction->Identity];
Do[Export["Users/Shared/"<>ToString[x]<>".eps", plota, "EPS"],
  {x, 100000}]
  
But it doesn't seem very useful to have a large number of copies of the same plot in files with different names. And with different plots, you will need the memory for each. 
--
To reply via email subtract one hundred and four


  • Prev by Date: Re: MultipleListPlot Prolem
  • Next by Date: RE: Front End Memory usage while exporting many graphics
  • Previous by thread: Re: Front End Memory usage while exporting many graphics
  • Next by thread: RE: Front End Memory usage while exporting many graphics