Skip to content

Changing the y label for histogram in plotly express does not work #2876

@vikigenius

Description

@vikigenius

Hi I am using plotly express to plot a histogram.

import plotly.express as px

px.histogram(
    cdf,
    x='diag',
    histnorm='probability',
    labels={'diag': 'cosine similarity'},
    title='Cosine Similarity of Diagonal Samples',
    color_discrete_sequence=['green'],
)

The y label is shown as count, I want the y label to be called probability.
I tried passing labels={'diag': 'cosine similarity', 'count': 'probability'} but that doesn't work? How do I change the y label ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions