Skip to content

geom_jitter can produce the same jitter across facets #6858

@mjsulik

Description

@mjsulik

ggplot2 version 4.0.3

Example:

library(ggplot2)
test <- data.frame(
  group = c(1, 2, 1, 2, 1, 2), 
  x = c(1, 2, 3, 4, 5, 6), 
  y = c(0, 0, 0, 0, 1, 1))
ggplot(test, aes(x = x, y = y)) + 
  geom_jitter(height = .2, width = 0) + 
  facet_wrap(. ~ group)

Is this the intended behavior? I expected jitter values to be independently generated across facets.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions