[R] Multiple plots on same graph

Paul, David A paulda at BATTELLE.ORG
Sun Jul 6 01:29:08 CEST 2003


R1.7, Win2k:

I have some Splus code that has allowed me, in the past,
to place multiple plots on the same graph:


plot(y1 ~ x1, data = foo1.frame, type = "l", xlab="",ylab="", 
     xlim=c(...,...), ylim=c(...,...), axes=F)
par(new=T, xaxs = "d", yaxs = "d")
plot(y2 ~ x2, data = foo2.frame, col = 2)


However, I get the error message
"Error in plot.new() : axis style "d" unimplemented"
Can anyone recommend a way for me to accomplish the same
thing as the code above?  If I simply use par(new=T),
the produced graph contains elements that do not correspond
to the same axis-scales.


Thanks in advance,
  david paul




More information about the R-help mailing list