[R] R: Error in plot.new() : axis style "d" not implemented
Hinnerk Boriss
boriss at izbi.uni-leipzig.de
Tue Nov 12 18:10:53 CET 2002
Hi there!
Both on windows and Solaris platforms I run into troubles when trying to
draw two plots on top of each other. Here a short code example:
> x1 <- c(2,3,4,5,6,7,8)
> y1 <- sin(x1)
> x2 <- c(1,2,3,4,5,6,7,8,9,10)
> y2 <- cos(x2)
> d1 <- cbind(x1,y1)
> d2 <- cbind(x2,y2)
> plot(d1)
> par(new=T, xaxs="d")
> plot(d2)
Error in plot.new() : axis style "d" unimplemented
>
And here an excerpt from the R help pages:
xaxs
The style of axis interval calculation to be used for the x-axis.
Possible values are "r", "i", "e", "s", "d". The styles are generally
controlled by the range of data or xlim, if given. Style "r" (regular)
first extends the data range by 4 percent and then finds an axis with
pretty labels that fits within the range. Style "i" (internal) just
finds an axis with pretty labels that fits within the original data
range. Style "s" (standard) finds an axis with pretty labels within
which the original data range fits. Style "e" (extended) is like style
"s", except that it is also ensured that there is room for plotting
symbols within the bounding box. Style "d" (direct) specifies that the
current axis should be used on subsequent plots. (Only "r" and "i"
styles are currently implemented)
As I understand the manual pages, this should work. However it doesn't.
Is there any other way to combine plots and align them on the same axis?
I hope someone can help.
Cheers,
Hinnerk
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list