MathGroup Archive 2000

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

Search the Archive

Re: save a plot

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25191] Re: [mg25156] save a plot
  • From: Tomas Garza <tgarza01 at prodigy.net.mx>
  • Date: Tue, 12 Sep 2000 21:24:34 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

You maylook at FullForm of the plot produced, and you'll find all the 
information about the plot. In particular, you may extract thereof the 
whole set of points which Mathematica has joined with succesive line 
segments to produce the plot. This set you can save for future use. Take 
the following example (outputs ommitted):

In[3]:=
p = Plot[Sin[x], {x, 0, 2 Pi}]

In[4]:=
FullForm[p]

Here you extract only the points you need:

In[5]:=
points= Cases[p, List[x_, y_] -> {x, y}, Infinity]

Then you may save "points" for further use. Save them using >>, i.e.

points>>pointsforplotp

and retrieve them with

<<pointsforplotp

Tomas Garza
Mexico City


"Martin Richter" <mr.fi at cbs.dk wrote:

> I'm making some plots, for which is takes Matematica a long time to 
plot.
> After making some plots I export them to EPS and is using Show to 
include
> different figures in one plot. Sometimes I need to include/exclude a 
figure
> or rescale the plot after the figure was initial made. If I have 
closed and
> reopen my session the plots are not saved (of course the pictures but 
I
> can't manipulate the plot).
>
> Basic question: Is there a way to save plots or just the points used 
to
> generate the plots such that I don't need to redo all the calculations 
or
> make a list of points myself ?




  • Prev by Date: Re: Disabling MathReader?
  • Next by Date: Re: PseudoInverse for exact matrices
  • Previous by thread: Re: save a plot
  • Next by thread: Re: save a plot