I want to create a violin plot with geom_jitter dots greater than a defined value.
Below is the picture and code I used to get this violin plot with a box plot and geom_jitter for data points. Is there a way to have geom_jitter for dots >58 and hide all the rest?
library(nycflights13)
library(ggplot2)
library(dplyr)
weather3 <- weather %>%
filter(month == 3)
viol_plot <- ggplot(weather3, aes(x = factor(month), y = temp)) +
geom_violin()
viol_plot + geom_boxplot(width=0.2) + geom_jitter(shape=20, position = position_jitter(0.05))
viol_plot + geom_jitter(shape=20, position = position_jitter(0.05))
Thank you!