Usually when I plot some R line plot and set ylim=c(0,some_value), there is small space between the x axis and y=0.
I would like the y axis to show exactly at y=0 so points (x,0) will be plotted on the y axis (and not above).
解决方案
You probably want the graphical parameters xaxs and yaxs with style "i":
plot(1:10, rnorm(10), ylim=c(0,10), yaxs="i")
See ?par:
xaxs: The style of axis interval
calculation to be used for the x-axis.
Possible values are "r", "i", "e",
"s", "d". The styles are generally
controlled by the range of data or
xlim, if given. Style "r" (regular)
first extends the data range by 4
percent at each end and then finds an
axis with pretty labels that fits
within the extended r