Skip to content

Stacked bar graph: Bar segments are sorted in opposite order of legend. #6014

Closed
@csaid

Description

@csaid
#The legend is sorted 'A, B, C', but the bar segments are sorted 'C, B, A'.
d = {'A': [2,3], 'B': [4,5], 'C': [6,7]}
df = pd.DataFrame(data=d)
df.plot(kind='bar', stacked=True)

Thanks, and here's my full version string:

INSTALLED VERSIONS

Python: 2.7.6.final.0
OS: Darwin
Release: 13.0.0
Processor: i386
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

pandas: 0.13.0
Cython: Not installed
Numpy: 1.8.0
Scipy: 0.13.1
statsmodels: Not installed
patsy: Not installed
scikits.timeseries: Not installed
dateutil: 2.2
pytz: 2013.9
bottleneck: Not installed
PyTables: Not Installed
numexpr: Not Installed
matplotlib: 1.3.1
openpyxl: Not installed
xlrd: Not installed
xlwt: Not installed
xlsxwriter: Not installed
sqlalchemy: Not installed
lxml: Not installed
bs4: Not installed
html5lib: Not installed
bigquery: Not installed
apiclient: Not installed

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