ggplot(data =data,aes(x = Voting.Method, y = Accuracy, linetype =Type))+
geom_boxplot(fill="white", fatten = 0) +
stat_summary(fun = mean, geom = "errorbar", aes(ymax = ..y.., ymin = ..y.., color = "mean"),
width = .75, linetype = "solid") +
stat_summary(fun = median, geom = "errorbar", aes(ymax = ..y.., ymin = ..y.., color = "median"),
width = .75, linetype = "solid") +
theme(legend.title=element_blank(), legend.text = element_text(size=10, face="bold"),
legend.position =c(0.9,0.9),legend.direction = "horizontal") +
scale_y_continuous(limits = c(50, 75))
Asked
Active
Viewed 161 times
0

Benson_YoureFired
- 425
- 4
- 17

HYUN K
- 9
-
Please provide a `dput()` of your data for reproducibility. – Benson_YoureFired May 17 '22 at 15:08
-
For one option using `cowplot` see this related post: https://stackoverflow.com/questions/68369581/how-to-place-legends-at-different-sides-of-plot-bottom-and-right-side-with-ggp/68369737#68369737 – stefan May 17 '22 at 15:12
-
Try to add inside `theme`, `legend.position = "bottom"` – maluwalmk May 18 '22 at 03:13