Skip to content

y-position of points created with gghalves::geom_half_point() is variable #26

@alesantuz

Description

@alesantuz

Windows 10 x64, build 19045, x86-64 machine
R version 4.3.1 (2023-06-16 ucrt)

As per title, when plotting individual data points with gghalves::geom_half_point(), the y-position of the points changes at every run, especially when the data set is very small.

MRE:

ggplot2::ggplot(iris, ggplot2::aes(x = Species, y = Petal.Width, fill = Species)) + 
    gghalves::geom_half_point()

Another reproducible example, where the error is amplified by the small data set:

data <- data.frame(
  group = c("1", "2", "2", "1", "2", "2", "2", "2"),
  value = c(0.526, 0.473, 0.505, 0.508, 0.505, 0.488, 0.47, 0.499)
)

ggplot2::ggplot() +
  gghalves::geom_half_point(
    data = (data),
    ggplot2::aes(
      x = .data[["group"]],
      y = .data[["value"]]
    )
  )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions