[R] Trying to get xlim to do what I want

Ian Wilson i.wilson at maths.abdn.ac.uk
Wed May 17 13:52:00 CEST 2000


plot(x,y,ylim=c(0,800),xlim=c(0,2000)),xaxs="i", yaxs="i");

see help(par) for details
the relevant bit is:

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) 

Ian Wilson

>I'm trying to draw a plot with both the x and y axes starting at zero.
>However, even with xlim and ylim specified (e.g.
>plot(x,y,ylim=c(0,800),xlim=c(0,2000)) ), the axes still start just
>below zero.  The lowest x and y values are sufficiently higher than 0 so
>that having symbols overlapping isn't a problem.  How does one force R
>to do exactly what you want?
>



Dr Ian J Wilson
Department of Mathematical Sciences
University of Aberdeen
Aberdeen, AB24 3UE

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