Closed
Description
In CRAN version, it doesn't manage to dodge the text correctly...
library(tidyverse, quietly = TRUE)
#> Warning: package 'ggplot2' was built under R version 4.4.1
library(palmerpenguins, quietly = TRUE)
penguins |>
count(species, sex) |>
ggplot(
aes(x = sex,
y = n,
fill = species,
label = n),
) +
geom_col(
position = position_dodge(preserve = "single"),
width = 0.75,
alpha = 0.9,
) +
geom_text(
colour = "black",
position = position_dodge(width = 0.75, preserve = "single"),
vjust = 1.33,
)
#> Warning in max(table(panel$xmin)): no non-missing arguments to max; returning
#> -Inf
Created on 2024-07-12 with reprex v2.1.0
Metadata
Metadata
Assignees
Labels
No labels