[R] Animation and a better Quincunx
Thomas Lumley
thomas at biostat.washington.edu
Mon Nov 30 18:33:50 CET 1998
On Mon, 30 Nov 1998, Kjetil Halvorsen wrote:
> The solution I sent yesterday, only changing the original
> Quincunx.prg() adding the magic cat(""), isn't very satisfactory.
>
> This is a complicated animation, using two panels, and (at least
> on rw063) drawing in only one panel destroys the content of the
> other. A better possibility seems to use (the new) function
> split.screen, see Quincunx.screen appended at tail.
At least under Unix there is a good reason (I haven't looked at the
changes in Guido's code to see if it still applies). From help(dev.print)
Every device has a display list which records all of
the graphics operations that occur in the device.
`dev.copy' and `dev.print' copy graphics contents by
copying the display list from one device to another
device. Also, automatic redrawing of graphics contents
following the resizing of a device depends on the con-
tents of the display list.
After the command `dev.control("inhibit")', graphics
operations are not recorded in the display list so that
`dev.copy' and `dev.print' will not copy anything and
the contents of a device will not be redrawn automati-
cally if the device is resized.
The recording of graphics operations is relatively
expensive in terms of memory so the command
`dev.control("inhibit")' can be useful if memory usage
is an issue.
It looks like you should try dev.control("inhibit") before animating.
-thomas
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list