On Fri, 2006-03-17 at 00:33 +0100, Jing Yang wrote:
> Dear R-users,
> 
> Does anybody know in plot() how to set the values of the axis in
> reverse order, like in excel there is an option to format the axis?
> 
> Best,Jing


Just reverse the range of the axis you want, using 'xlim' for x and/or
'ylim' for y:

  plot(1:10, xlim = c(10, 0))

See ?plot.default for more information.


Sometimes using a construct such as:

  ylim = rev(range(YourVector))

may be helpful as well.

See ?rev and ?range for more information.

HTH,

Marc Schwartz

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to