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.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to