MathGroup Archive 1993

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

Search the Archive

Graphics output as input

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Graphics output as input
  • From: fulling at sarastro.math.tamu.edu (Stephen A. Fulling)
  • Date: Thu, 26 Aug 93 14:03:41 CDT

We are plotting some graphs that take a long time to compute (at least
on an aging Sun-3).  We want to save the graphics to files, then come
back and display them all at once.  The first step is easy:

Display["<filename>.ps", <graphics command>]

where <graphics command> is something like

Plot[myslowfunction[x], {x,-1,1}] .

But how to read the files back in, in a later session?  In the
Mathematica book, the documentation for Read[] and ReadList[] gives a
list of allowed "types" of input data, but "Graphics" is not among
them!  Our solution is somewhat complex, and not exactly obvious from
the book, so it may be of general interest:

Show[Graphics[Thread[PostScript[Readlist["<filename>.ps",
			String]]]]] .

=========================== clip here ===================

ReadGraph[x_] :=
     Show[Graphics[Thread[PostScript[ReadList[x,String]]]]]

=========================== clip here ===================

				    Davin M. Potts
				    Stephen A. Fulling






  • Prev by Date: mma and finite fields
  • Next by Date: 3-D curve
  • Previous by thread: mma and finite fields
  • Next by thread: 3-D curve