Re: [R] multiple plots with par mfg

From: Yan Wong <H.Y.Wong_at_leeds.ac.uk>
Date: Tue 23 May 2006 - 22:04:51 EST

On 23 May 2006, at 12:48, Prof Brian Ripley wrote:

> On Tue, 23 May 2006, Yan Wong wrote:
>> if not, can anyone suggest a way of appending to 2
>> separate plots on the fly.
>
> No, it is user error. par(mfg=) specifies where the next figure
> will the drawn, and points() does not draw a figure but adds to
> one. As the help page says:
>
> 'mfg' A numerical vector of the form 'c(i, j)' where 'i' and 'j'
> indicate which figure in an array of figures is to be drawn
> next (if setting) or is being drawn (if enquiring).
> ^^^^

OK. I didn't appreciate the distinction between drawing and adding.

> You need to use screen() or layout() to switch back to an existing
> plot.

Thanks, but the help page for screen says "The behavior associated with returning to a screen to add to an existing plot is unpredictable and may result in problems that are not readily visible." I assume this to mean that I shouldn't do it using screen().

I can't find any description of how to add points to several different plots generated after a layout() call. Is there a way?

Cheers

Yan



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue May 23 22:15:15 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 24 May 2006 - 00:10:16 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.