Depending on what exactly you mean by “a range of values from 1 to 100,” one of the following should do the trick.
In the first, plot
by default extends the axis limits by 4% at both ends
In the second case, xaxs="i"
and yaxs="i"
are used to suppress this behavior. (For more details see ?par
.)
plot(x,y, xlim=c(0,100), ylim=c(0,100))

plot(x,y, xlim=c(0,100), ylim=c(0,100), xaxs="i", yaxs="i")

source share