Quantcast
Channel: Geom_jitter colour based on values - Stack Overflow
Browsing all 2 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

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 Article



Image may be NSFW.
Clik here to view.

Geom_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
Browsing all 2 articles
Browse latest View live




Latest Images