I am trying to make a series of graphs that are based on a binomial variable. I want to add data points to the graph based on a different factored variable with 3 levels. I have been trying to use geom_jitter which worked to put the points on the box plot but I havent been able to change the colors to represent the different levels of the factored variable.
Here is the code I have been using
longg <- ggplot(long, aes(x = mbbase, y= beta)) +
geom_boxplot() + facet_wrap(~test) +
ylab("Beta") +
theme_cleveland() +
scale_fill_viridis(discrete = TRUE, alpha=0.09) +
theme(axis.text.x = element_text(angle = 90, vjust = 0.5, hjust=1)) +
theme(axis.title.x = element_blank()) +
geom_jitter( size=0.7, alpha=1, width = 0.05)
Here is an example of the graph I want with the mtcars data but instead of a numeric variable as the color id like a factored variable with 3 levels but I only want the color of the data points to change without adding a new box plot for each level of the factored variable

