I want to set the starting point of my graph (both in the x- and y-axis) to be zero. I have used the xlim()
and ylim()
functions to no avail. I have at
Your axes do start at 0, and xlim
and ylim
are what you need to change that.
What I think you are referring to is the spacing between the axes and the plot.
There are two extra parameters that allow you to change that, xaxs
and yaxs
.
plot (x, y, xlim=c(0,10), ylim=c(0,10),
xaxs="i", yaxs="i")
This should do the trick
See the par
help for more info.