[R] Reversing x-axis

ben@zoo.ufl.edu ben at zoo.ufl.edu
Thu Dec 7 22:52:16 CET 2000


http://www.ens.gu.edu.au/robertk/R/devel/00b/0206.html
http://www.ens.gu.edu.au/robertk/R/devel/00a/0419.html

  At this time, you have to do something like

x <- rnorm(100)
y <- rnorm(100)
plot(max(x)-x,max(y)-y,axes=FALSE)
xlabvals <- pretty(x,5)
ylabvals <- pretty(y,5)
axis(side=1,at=max(x)-xlabvals,labels=xlabvals)
axis(side=2,at=max(y)-ylabvals,labels=ylabvals)

  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).


-- 
318 Carr Hall                                bolker at zoo.ufl.edu
Zoology Department, University of Florida    http://www.zoo.ufl.edu/bolker
Box 118525                                   (ph)  352-392-5697
Gainesville, FL 32611-8525                   (fax) 352-392-3704


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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