The reason why I ask this question is that I found the lwd parameter is in par() function reference but not in geom_boxplot() function. We all know that the parameters in par() function is for R basic graphics, while geom_boxplot() is a ggplot2 function. But when I add a code lwd=1.5 in the geom_boxplot(), the line width change 1.5 times than the default (just like the description in par() ). For example:
p <- ggplot(mpg, aes(class, hwy))
p + geom_boxplot(lwd=1.5)
It get a plot with thicker lines:
But when I use par(lwd=1.5) and just use geom_boxplot(), nothing changed to that ggplot:
par(lwd = 1.5)
p <- ggplot(mpg, aes(class, hwy))
p + geom_boxplot()
- Does the ggplot2 use/inherit some parameters in the R basic graphics,
i.e parameters in
par()? - If it does, why I use
par(lwd = 1.5)or something similar to this form can not change anything to a ggplot2 picture?
