I'm trying to plot() over an existing plot() like this:

> attach(mtcars)
> plot(mpg, hp)
> par(new=TRUE)
> par("usr")
[1]   9.46  34.84  40.68 346.32
> plot(mpg, hp, col="red", axes=FALSE, xlim=par("usr")[1:2], 
> ylim=par("usr")[3:4], xlab="", ylab="")
> par("usr")
[1]   8.4448  35.8552  28.4544 358.5456

For some reason "usr" is changing, and so it's not plotting over the
existing data in the right place.

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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