MathGroup Archive 1998

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

Search the Archive

Re: Re: Plots from Previous Session



At 7:25 +0200 28/03/98, Paul Abbott wrote:
>Exporting Graphics
>
>Q: I want to save a Mathematica graphic to a file as a GIF image. Can I
>export the graphic from a notebook without re-executing the code that
>created it?
>
>John Fultz (jfultz@wolfram.com) answers: Display can accept a cell
>expression as well as a graphics expression. Here is a function that
>pulls the cell expression from the notebook and sends it to Display,
>thus avoiding recomputing the graphic in the kernel:
>
>	DisplayNotebookGraphic[f_String, n_Integer, t_String] :=
>	  Display[f, Cases[NotebookGet[EvaluationNotebook[]],
>	     Cell[GraphicsData[___], ___], -1][[n]], t]
>

With this code, when a user has expanded the image before processing it
will create a file with the right size but only the part corresponding
to standard size will be filled with (part of) the plot, the remaining
will be blank).
This is at least what I observe with my Mathematica 3.0.1 version on
Power Macintosh while exporting GIF images.

 I did not succeed in improving the original version to take this kind
of parameters into account correctly. (My idea was to extract the
options at the end of the cell expression and reinject or mix them into
the Display command after the three parameters. I have not succeeded in
saving a graphics more than StandardSize with all its content as a GIF.

  Moreover, Display does not seem to have the same behavior when saving
a Graphics output of the current session and when saving a cell of a
previous session. For instance in the first case, tickmarks of a plot
have disappeared while they were conserved when saving with John Fultz
routine. It is reminiscent of the behaviour of Show with Plot options
such as Axes.


Olivier





  • Prev by Date: Re: Plots from Previous Session (2)
  • Next by Date: Hue ? and MGF-format
  • Prev by thread: Re: Plots from Previous Session
  • Next by thread: Integer designation