[R] Reversing x-axis
ihaka at stat.auckland.ac.nz
Fri Dec 8 01:29:25 CET 2000
On Thu, Dec 07, 2000 at 04:52:16PM -0500, ben at zoo.ufl.edu wrote:
> At this time, you have to do something like
> x <- rnorm(100)
> y <- rnorm(100)
> xlabvals <- pretty(x,5)
> ylabvals <- pretty(y,5)
> I think it's time to put this one in the FAQ ... (although, again, I
> don't know if I would have found it just searching the archives if I
> hadn't remembered that it was there in the first place).
If I understand this right, you want to reverse the direction of the axes.
This is a bug which seems to have crept in at some point and hung around
rather longer than it should have. In the development version you can
now do the following:
x <- rnorm(100)
y <- rnorm(100)
plot(x, y, xlim=rev(range(x)), ylim=rev(range(y)))
and get the result you expect.
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