Closed madsurgeon closed 5 years ago
Hi, you should use geom_hline
as in the following example:
library(mgcViz)
set.seed(2) ## simulate some data...
dat <- gamSim(1,n=1000,dist="normal",scale=2)
# Fit GAM and get gamViz object
b <- gamV(y~x0+s(x1)+ s(x2)+s(x3), data = dat,
aGam = list(scale = 2), aViz = list("nsim" = 20))
print(plot(b, allTerms = TRUE) + geom_hline(yintercept = 0, col = "grey"), pages = 1)
Thank you very much!
Hi, is there a way to add a horizontal line to each graph in print(plot(b, allTerms = T), pages = 1) ? I would be interested to display a horizontal line at 0 in each of the graphs. Thanks!