Skip to content

Plot

3 messages · Apple Ho, paul sorenson, Marc Schwartz

#
Apple Ho wrote:
How close to the corner do you want it?

 > plot(0, 0, xlim=c(0, 1), ylim=c(0,1))
you could also add:
 > grid()
#
On Wed, 2005-12-07 at 18:08 +1100, paul sorenson wrote:
By default, R adds +/- 4% to each axis range, based upon the range of
the x and y values or the 'xlim' and 'ylim' arguments. 

This behavior is set by pars 'xaxs' and 'yaxs', which are set to "r" by
default. Setting both to "i" will provide exact axis ranges.

Note the difference between:

 plot(0:5, 0:5)

and

 plot(0:5, 0:5, xaxs = "i", yaxs = "i")

See ?par for more information.

HTH,

Marc Schwartz