Skip to content

geom_boxplot + geom_jitter documentation clarity #2793

@igordot

Description

@igordot

In the documentation for geom_boxplot, there is an example:

p <- ggplot(mpg, aes(class, hwy))
p + geom_boxplot() + geom_jitter(width = 0.2)

This is useful if you want to see all the points. What is not entirely obvious is that the command retains both the outlier and jitter points. Thus, you may end up with more plotted points then data points. You can see this more easily by coloring one of them:

p + geom_boxplot(outlier.colour = "red") + geom_jitter(width = 0.2)

I am not sure what the proper fix would be since this is not really an error, but the documentation should probably clarify this situation.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions