Skip to content

How to plot multiple graphs each with multiple y variables

3 messages · gina patel, Gabor Grothendieck, Peter Alspach

#
Try something like this where we use the built in data frame anscombe:

opar <- par(mfrow = c(1, 2), no.readonly = TRUE)
matplot(1:11, anscombe[1:4], pch = 1:4, col = 1:4, log = "x", ylab = "Y")
matplot(1:11, anscombe[5:8], pch = 1:4, col = 1:4, log = "x", ylab = "Y")
par(opar)
On Mon, Feb 9, 2009 at 4:43 PM, gina patel <ginapatel1981 at yahoo.com> wrote:
#
Kia ora Gina

If I understand you correctly, you need to specify mfrow argument as c(1,2) and then make your two calls to plot().  HTH ...

Peter Alspach
The contents of this e-mail are confidential and may be subject to legal privilege.
 If you are not the intended recipient you must not use, disseminate, distribute or
 reproduce all or any part of this e-mail or attachments.  If you have received this
 e-mail in error, please notify the sender and delete all material pertaining to this
 e-mail.  Any opinion or views expressed in this e-mail are those of the individual
 sender and may not represent those of The New Zealand Institute for Plant and
 Food Research Limited.