[R] zero margin / marginless plots
marc_schwartz at comcast.net
Thu Jan 11 04:36:33 CET 2007
On Wed, 2007-01-10 at 21:18 -0600, David Forrest wrote:
> I'd like to produce a marginless or zero margin plot so that the pixel
> coordinates represent the mathematics.
> The resultant file has about a 10 pixel margin around these lines, and I'm
> not sure what parameter or function is controlling this offset. Any
> Thanks for your time,
By default, the axis ranges are extended by +/- 4%. You can change this
plot(xy$x, xy$y, xlim = c(0, 1), ylim = c(0, 1),
xaxs = "i", yaxs = "i")
where 'xaxs' and 'yaxs' set the axis ranges to the actual data ranges.
See ?par for more information.
More information about the R-help