[R] axis invertion

Peter Dalgaard p.dalgaard at biostat.ku.dk
Thu Nov 22 23:51:06 CET 2007


Juan Pablo Fededa wrote:
> Hi all,
>
> I want to invert the y axis of a plot, how can I do that in an easy way?
> Thanks in advance,
>
>   
Plot x vs. y, then rotate paper 90 degrees clockwise? ;-)

Seriously, switching the endpoint as in ylim=c(ymax,ymin) should do the 
trick. Or maybe ylim=rev(range(y)).



> Juan Pablo
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
>   


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list