Skip to content

[Feature] Apply histfunc to marginal histogram for 2d histogram and 2d contour #3521

@lucasjamar

Description

@lucasjamar

Python: 3.8
Plotly: 5.4.0

For 2d histograms and contour plots, plotly always applies count for the marginal plots regardless of the z value and histfunc provided.
It would be awesome if z and the histfunc were provided to the marginal histograms. Example code:

Thanks for plotly!

import plotly.express as px
df = px.data.tips()

fig = px.density_heatmap(df, x="size", y="tip", z="total_bill", histfunc="sum", marginal_x="histogram", marginal_y="histogram")

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