'Included rounded medians in a box plot
So I know how to include the medians but I can’t seem to figure out how to round them.
This is what I have so far (if I mess up with how I include the code sorry this is my first time posting)
medians<-aggregate(FGPChange~convert,df,median)
df %>%
ggplot(aes(x=convert, y=FGPChange, fill=convert)) +
geom_boxplot(fill='dark red') +
theme_bw() +
theme(panel.border = element_blank(),
panel.grid.major = element_blank(),panel.grid.minor
= element_blank(), axis.line = element_line(colour =
"black"))+
stat_summary(fun=median, geom="point",shape=18, size=3,
color="red",fill="red")+
geom_text(data=medians,aes(label=FGPChange,y=FGPChange+6.00))+
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
