0

For geom_jitter we use any other criteria (let's say, "color = year" in gapminder) in aes() of ggplot() itself which is more convenient than writing the same in geom_point. But, is there any other reason that geom_jitter is used more?

neilfws
  • 32,751
  • 5
  • 50
  • 63
  • 1
    I don't think it's used more. `geom_jitter` is helpful in situations where multiple observations might be plotted to the same point ("overplotting"), and you want to make it more visually perceptible that there are multiple points there. The only difference is that a uniform distribution of noise is added to the x and y coordinates of each plotted point. – Jon Spring Sep 19 '22 at 23:15
  • 1
    Good visuals on the same question: https://stackoverflow.com/questions/39255781/what-is-difference-between-geom-point-and-geom-jitter-in-simple-language-in-r – TTS Sep 19 '22 at 23:22
  • A use case for `geom_jitter` is when you are plotting a continuous dependent variable against a categorical independent variable. You could use a boxplot for that case, but you may want to see all the observations and get an idea of their distribution. `geom_point` would be used for a scatterplot, where both x and y are continuous. – neilfws Sep 19 '22 at 23:39

0 Answers0