dev.copy(device, ..., which=dev.next()) dev.print(device=postscript, ...) dev.control("inhibit")
which
or
device
can be supplied.
dev.copy
starts a graphics device given
by
device
or uses an active device given by
which
.
It copies the current graph onto the new graphics device and sets this
graphics device as the current device.
dev.print
starts a graphics device given
by
device
and copies the graph from the current graphics device
onto this new graphics device then turns off the new graphics device.
dev.control
allows you to turn off
the internal display list kept for the current graphics device.
This saves memory,
but disables
dev.copy
and
dev.print
.
dev.print
is most useful
when
device
is a hardcopy graphics device.
If you know you will not be using
dev.print
or
dev.copy
with the current
graphics device,
and you find that your plots are taking a lot of memory,
you can use the S-PLUS expression
dev.control("inhibit")
after starting your device,
and S-PLUS will not maintain a display list for the graphics device.
If you want to turn the display list back on,
you must restart the graphics driver.
This internal display list contains a record of graphics done
since the last time the drawing area was cleared,
and is necessary for
dev.print
and
dev.copy
to work.
Do not use
dev.copy
or
dev.print
if you have inhibited the
display list;
the state of the graphics devices may get confused.
motif() plot(corn.rain, corn.yield) dev.copy(device=postscript, file="corn.ps")