tags:

views:

383

answers:

1

I want to remove the space between the axes of the plot and the plot contents themselves. Any ideas?

+5  A: 

Look at the parameters xaxs and yaxs (under ?par). By default the axis contains the data range plus 4% on either side. If you override the parameter, then you can get an axis exactly equal to the data range. Cf:

> curve(x^2)

> curve(x^2, xaxs="i", yaxs="i")
Jonathan Chang
it still doesn't appear to completely work, i still some space on the y side but i think this is also a relatively new feature. Thanks though.
Dan