RE: [R] How to put multiple plots in the same window? (not par(mf row=))

From: Austin, Matt <maustin_at_amgen.com>
Date: Sat 31 Jul 2004 - 01:56:31 EST


Lattice graphics may be the answer depending on your exact problem.

Here is an example of four traditional plots without space:

par(mfrow=c(2,2), omi=c(.5, .5, .5, .5)) par(mar=c(0, 2, 2, 0))
  plot(rnorm(10), rnorm(10), axes=FALSE)   box(); axis(2); axis(3)
par(mar=c(0, 0, 2, 2))
  plot(rnorm(10), rnorm(10), axes=FALSE)   box(); axis(3); axis(4)
par(mar=c(2, 2, 0, 0))
  plot(rnorm(10), rnorm(10), axes=FALSE)   box(); axis(1); axis(2)
par(mar=c(2, 0, 0, 2))
  plot(rnorm(10), rnorm(10), axes=FALSE); box()   box(); axis(1); axis(4)

I have generalized this in the past to allow for more (in a for loop I think), but I don't have access to my home computer from here.

--Matt

-----Original Message-----
From: r-help-bounces@stat.math.ethz.ch
[mailto:r-help-bounces@stat.math.ethz.ch]On Behalf Of F Duan Sent: Friday, July 30, 2004 8:42 AM
To: r-help@stat.math.ethz.ch
Subject: [R] How to put multiple plots in the same window? (not par(mfrow=))

Dear All,

I am sorry if this question has been asked before. Below is my Question:

I want to put several plots in the same window, but I don't want the blank space between plots (like par(mfrow=)) --- that makes the plots too small. Could anyone tell me how to do it?

Thanks a lot.

Frank



R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide!
http://www.R-project.org/posting-guide.html

R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sat Jul 31 02:24:33 2004

This archive was generated by hypermail 2.1.8 : Wed 03 Nov 2004 - 22:55:22 EST