Skip to content

Plotly Express labels dict not applying to traces generated with the color keyword #3049

@daviddekoning

Description

@daviddekoning

I have a dataframe that I am using to generate an area chart with three components. These components are split out using the color keyword. Unfortunately, the labels keyword only renames the title of columns, not the names of traces generated by the color keyword. In the example below, it would be great to be able to replace steady, new_users and churn with more descriptive labels.

Of course, I can work around this by modifying the original data frame, but the labels dict is so elegant...

image

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