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?
(email@example.com) answers: 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 , thus avoiding recomputing the graphic in the kernel:
This function must be run in the notebook that contains the graphic. The first argument is the name of the file to which should send its output. The second argument specifies which graphic to save (the n-th graphic in the notebook, counting from top to bottom). The third argument is the file type (such as GIF, EPS, or PDF). For example, this input saves the first graphic in the notebook to the file as a GIF image: