I have this ggplot:
ggplot(dt.m, aes(x=pct.on.OAC.cont,y=Number.of.Practices, fill=Age.Group)) +
geom_bar(stat="identity",position=position_dodge()) +
geom_smooth(aes(x=pct.on.OAC.cont,y=Number.of.Practices, colour=Age.Group), se=F)
How can I increase the thickness of the lines drawn by geom_smooth ?
To change line width, just add argument size=2 to geom_line().
It then computes the confidence interval based on a set number of standard-error intervals around the predicted value (for the typical 95% CI, this is predicted ± 1.96 * se ). The Details section of geom_smooth says: Calculation is performed by the (currently undocumented) 'predictdf()' generic and its methods.
Example 2: Modify Level of Confidence Interval By default, geom_smooth() uses 95% confidence bands but you can use the level argument to specify a different confidence level.
Description. Aids the eye in seeing patterns in the presence of overplotting.
Do the size
argument do what you want:
+ geom_smooth(aes(x=pct.on.OAC.cont, y=Number.of.Practices, colour=Age.Group),
se=F, size=10)
alternatively, you could change size
to lwd
, but it is standard to use size
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With