Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

increasing the line thickness of geom_smooth

Tags:

r

ggplot2

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 ?

like image 353
Robert Long Avatar asked Oct 05 '12 12:10

Robert Long


People also ask

How do you make a Geom line thicker?

To change line width, just add argument size=2 to geom_line().

What does the SE argument of Geom_smooth () do?

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.

What is the confidence interval in Geom_smooth?

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.

What is Stat_smooth in R?

Description. Aids the eye in seeing patterns in the presence of overplotting.


1 Answers

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.

like image 139
csgillespie Avatar answered Sep 20 '22 01:09

csgillespie