Graphics Input to Mma
- To: mathgroup at yoda.physics.unc.edu
- Subject: Graphics Input to Mma
- From: reza at ai.mit.edu (Reza Shadmehr)
- Date: Wed, 13 Oct 93 09:38:05 EDT
Although Mma can read a graphics file that it has produced and
can subsequently display it, it doesn't seem to be able to
manipulate the contents of the graph. What I have in mind is
something like this: Say I generate some data and produce a
graph and store it to a file. Some time later (perhaps after
exiting Mma), I wish to make that graph a bit different, for
example, change its PlotRange or add a label somewhere, or
incorporate it into another graph. I can reenter Mma and read
that graph and display it, but if I try to add a Line somewhere,
it doesn't incorporate it correctly into the coordinates of the
read graph.
Example:
Display["myplot.mps", Plot[x^2, {0,2}]]
Show[Graphics[Thread[PostScript[ReadList["myplot.mps",String]]]],
Graphics[Line[{{0,0},{1,1}}]]]
As you note, the Line is not incorporated in the graphics correctly.
This is probably because the Graphics read from a file is
fundamentally different from Graphics produced by a graphics function,
even though the file contains the result of a graphics function.
I suspect this is because of the way Display works. Is there a way
to address this problem?
best wishes,
Reza Shadmehr
Mass. Int. of Technology
reza at ai.mit.edu