Skip to content

[enhancement] equal position_dodge for incomplete factor combinatios #2033

Closed
@DSLituiev

Description

@DSLituiev

It has been often asked on stackoverflow and elsewhere how to plot bars /columns/ boxplots of even width when grouped by x and fill with some factor combinations missing, e.g. in following figure one wishes to have all bars of the same width:

uneven width
)

http://stackoverflow.com/questions/11020437/consistent-width-for-geom-bar-in-the-event-of-missing-data
http://stackoverflow.com/questions/15367762/include-space-for-missing-factor-level-used-in-fill-aesthetics-in-geom-boxplot?noredirect=1&lq=1
http://stackoverflow.com/questions/41968652/changing-geom-bar-widths-on-ggplot?noredirect=1&lq=1
http://stackoverflow.com/questions/38101512/the-same-width-of-the-bars-in-geom-barposition-dodge
http://howtodevelop.eu/question/r-ggplot2-changing-geom-bar-widths-on-ggplot,135411

etc, etc...

Some of recipes suggested work pretty well, but I wonder if this should be a default behaviour or at least some of these recipes can be incorporated as, let us say position_equal_dodge option?

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