Skip to content

geom_bar with stat='identity' does not stack values when only one group present #1398

@IKupriyanov-HORIS

Description

@IKupriyanov-HORIS
d = {
    'name': ['foo', 'foo', 'bar', 'bar'],
    'g': ['A', 'B', 'A', 'B'],
    'value': [80, 90, 15, 35]
}

ggplot(d) + geom_bar(aes(x='name', y='value', group='name'), stat='identity')

Actual result:
Image

When values are assigned to their own group, everything works as expected (note the mapping group='g'):

Image

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions