Answer by camille for Geom_jitter colour based on values
Listing names of colors in your geom as you did doesn't tell the color scale what colors to use—it just breaks values into categories. The strings "red" or "black" don't necessarily have any meaning...
View ArticleGeom_jitter colour based on values
Is there a way to color the jitter points on a boxplot based on a numeric value, so for example:ggplot(data, aes(y = y_var, x = x_var)) + geom_jitter(size = 2, aes(color = ifelse(y_var < 5, "red",...
View Article
More Pages to Explore .....