if(require(dplyr)) {
p <- iris %>%
tidyr::pivot_longer(cols = -Species,
names_to = "Outer sterile whorls",
values_to = "values") %>%
ggplot(data,
mapping = aes(x = `Outer sterile whorls`,
y = values,
fill = Species))
p + geom_hist_(position = position_dodge_())
}
# \donttest{
# all bins are shifted on the left
p +
geom_hist_(position = position_dodge())
# }
Run the code above in your browser using DataLab