Skip to content

Plotting methods (line, area, ..) don't handle string x values #22334

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

From #22307 (review): when specifying the x labels in one of our plotting calls where this consists of strings, nothing is shown on the x labels:

In [6]: df = pd.DataFrame({'sales': [3, 2, 3],
   ...:                    'visits': [20, 42, 28],
   ...:                    'day': ['Monday', 'Tuesday', 'Wednesday']})

In [7]: ax = df.plot.area(x='day')

figure_1-1

The same is true for line plot, for bar plot it does work.

Related to #18687 (but not exactly the same), and potentially #18726. I would have expected that there is already an issue for this, but didn't directly find it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions