8000 API/BUG: inconsistent plotting of new CategoricalIndex · Issue #10254 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content
API/BUG: inconsistent plotting of new CategoricalIndex #10254
Open
@jorisvandenbossche

Description

@jorisvandenbossche

To record the issue we discussed yesterday, to be solved for 0.16.2

Plotting of categorical:

  • y-axis: the 'values' itself are used
  • x-axis: they are not regarded as values, but as all unique items that just gets represented by a range(len(cat)) x data

Overview: http://nbviewer.ipython.org/gist/jorisvandenbossche/992d9d34dbfcfd8bc326

Disclaimer: didn't yet look into the code to see why this is like this.

Way forward:

  • for now: handle CategoricalIndex the same as column with Categorical values (so use the values itself)
    • this will also mean that a CategoricalIndex with string categories will raise now (in 0.16.1 it did not but plotted all values just in order, also discarding the fact the values with the same category should be regarded as equal)
  • later, we can try to implement more fancy / intelligent categorical plotting (there are already Feature request: Categorical plotting #9069 and ENH: support Categorical hist plotting #8712 about this)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0