xlim not working in plot.gam in mgcv
问题 The mgcv package in R lets you estimate smooth regressions on multiple variables. Here is an example: library(mgcv) set.seed(2) ## simulate some data... dat = gamSim(1,n=400,dist="normal",scale=2) mod = gam(y~te(x0, x1),data=dat) par(mfrow = c(2,1)) plot(mod) plot(mod, xlim = c(0, 0.5)) When I run this, the two plots look exactly the same. Why doesn't xlim = c(0, 0.5) restrict the range of the horizontal axis? How can I achieve this? Update on my session info: > sessionInfo() R version 3.0.1