[R] limit to complex plots?
Suzanne E. Blatt
SuzieBlatt at netscape.net
Thu Feb 26 16:15:07 CET 2004
Hello all.
I am trying to create one figure, divided into 6 graphs/plots each with an inset sub-figure. I can use to layout command to generate one figure with one inset sub-figure, but cannot seem to do it for multiple figures on one page.
I've tried a test with the following code:
layout(matrix(c(1,2,3,4), nrow=2, byrow=TRUE))
plot(rnorm(10), rnorm(10))
plot(rnorm(10), rnorm(10))
plot(rnorm(30), rnorm(30))
plot(rnotm(40), rnorm(40))
layout.show(4)
#this works and gives me my one page with 4 figures on it
layout(matrix(c(0,0,0,0,0,1,0,2,0,0,0,0,0,3,0,4), nrow=4, byrow=TRUE))
par(new=TRUE)
plot(rnorm(10), rnorm(10))
par(new=TRUE)
plot(rnorm(20), rnorm(20))
par(new=TRUE)
plot(rnorm(30), rnorm(30))
par(new=TRUE)
plot(rnorm(40), rnorm(40))
# this is the part that doesn't. I've tried only one 'par(new=TRUE)' command before ALL the plot commands and as written above. The best I can get is 3 sub-figures #2,3 and 4, in positions 1,2 and 3.
Has anyone figured this out?
thanks,
Suzanne Blatt
__________________________________________________________________
Introducing the New Netscape Internet Service.
More information about the R-help
mailing list