[R] Backgrounds in Multiple Plots made with "fig"

Tom La Bone booboo at gforcecable.com
Sun Jul 6 16:24:06 CEST 2008


The following code was adapted from an example Vincent Zoonekynd gave on his
web site http://zoonek2.free.fr/UNIX/48_R/03.html:

n <- 1000
x <- rnorm(n)
qqnorm(x)
qqline(x, col="red")
op <- par(fig=c(.02,.5,.5,.98), new=TRUE)
hist(x, probability=T,
     col="light blue", xlab="", ylab="", main="", axes=F)
lines(density(x), col="red", lwd=2)
box()
par(op)

How can I make the background in the small box in the upper left-hand corner
be a different color than the background in the main plot and erase any of
the main plot that happens to be behind the box?

Tom
 



-- 
View this message in context: http://www.nabble.com/Backgrounds-in-Multiple-Plots-made-with-%22fig%22-tp18302602p18302602.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list