Skip to content

position_dodge(2) default is "total" #3339

Closed
@alanocallaghan

Description

@alanocallaghan

This is counter to previous behaviour and (imo) is a worse default. It also contradicts the documentation.

See: https://ggplot2.tidyverse.org/reference/position_dodge.html

According to the docs and previous behaviour, these should be identical:

library("ggplot2")
ggplot(mtcars, aes(factor(cyl), fill = factor(vs))) + 
  geom_bar(position = position_dodge())                                                                                                    

ggplot(mtcars, aes(factor(cyl), fill = factor(vs))) + 
  geom_bar(position = position_dodge(preserve="single"))

Created on 2019-05-23 by the reprex package (v0.2.1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions