Skip to content

Commit

Permalink
Add median to violin plots
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesca Mancini committed Sep 14, 2018
1 parent 7d03342 commit 44fccc0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Visualisations.R
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,8 @@ length_business <- count(all_sims_socioecon, c("id", "trends", "tourists", "mana

ggplot(data = length_business) +
geom_jitter(aes(x = tourists, y = freq), shape = 20, color = "black", size = 1) +
geom_violin(aes(x = tourists, y = freq, fill = tourists), alpha = 0.8, draw_quantiles = 0.5) +
geom_violin(aes(x = tourists, y = freq, fill = tourists), alpha = 0.8) +
stat_summary(aes(x = tourists, y = freq), fun.y="median", geom="point") +
scale_fill_manual(values = pal, name = "Type of tourists") +
ylab("Years in business") +
xlab("Type of tourists") +
Expand Down

0 comments on commit 44fccc0

Please sign in to comment.