Re: [R] Animation and a better Quincunx

Thomas Lumley (thomas@biostat.washington.edu)
Mon, 30 Nov 1998 09:33:50 -0800 (PST)

Date: Mon, 30 Nov 1998 09:33:50 -0800 (PST)
From: Thomas Lumley <thomas@biostat.washington.edu>
To: Kjetil Halvorsen <khal@alumni.uv.es>
Subject: Re: [R] Animation and a better Quincunx
In-Reply-To: <36625E93.258EB6CF@alumni.uv.es>

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@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


This archive was generated by hypermail 1.02.