I have a small question regarding the ggplot, where in I want to know how to get the data points start with a 0 line without leaving that small gap on the left, right and the bottom.
This is my code:
hov.dat <- structure(list(x = c(3L, 3L, 9L, 25L, 25L, 27L, 30L, 39L, 49L,
56L, 60L, 65L), y = c(55, 54, 34.33, 34, 75.66, 44, 56.55, 54,
27.34, 30.75, 19.04, 25.29)), .Names = c("x", "y"), class = "data.frame", row.names = c(NA,
-12L))
with(hov.dat, plot(x, y))
qplot(x, y, data=hov.dat, geom=c('point', 'smooth'), method='lm', formula=y ~ ns(x, 3))
can anyone help me with what am I supposed to code to remove the left, right, and bottom gaps in the plot (marked with arrows in the picture)