This function works with the graphics window and mainly traditional
graphics (it may work with lattice or other graphics, but has not
really been tested with those).
This function creates a script file (or puts it on the clipboard so
that you can past into a script window or text editor) that will
recreate the current graph in the current graph window. The script
consists of very low level functions (calls to plot.window
and
axis
rather than letting plot
handle all this).
If you want the higher level functions that were actually used, then
use the history
or savehistory
commands (this will
probably be the better method for most cases).
Some of the low level plotting functions use different arguments to
the internal version than the user callable version (box
for
example), the arguments to these functions may need to be editted
before the full script will run correctly.
The lengths of command lines between the creation of the script and
what can be run in R do not always match, you may need to manually
wrap long lines in the script before it will run properly.