Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Using px.density_contour with both marginal_x and contours_coloring causes error #175

Description

@adamerose

I get the error below when trying to add marginal_x to the "continuously-colored and labeled" example on this page https://plotly.com/python/2d-histogram-contour/

importplotly.expressaspxdf=px.data.tips()
fig=px.density_contour(df, x="total_bill", y="tip", marginal_x='box')
fig.update_traces(contours_coloring="fill", contours_showlabels=True)
"C:\Program Files\Python38\python.exe"D:/_MyFiles/Programming/scratch/scratch.pyTraceback (mostrecentcalllast):
File"D:/_MyFiles/Programming/scratch/scratch.py", line6, in<module>fig.update_traces(contours_coloring="fill", contours_showlabels=True)
File"C:\Program Files\Python38\lib\site-packages\plotly\basedatatypes.py", line1376, inupdate_tracestrace.update(patch, overwrite=overwrite, **kwargs)
File"C:\Program Files\Python38\lib\site-packages\plotly\basedatatypes.py", line5067, inupdateBaseFigure._perform_update(self, kwargs, overwrite=overwrite)
File"C:\Program Files\Python38\lib\site-packages\plotly\basedatatypes.py", line3862, in_perform_updateraiseerrValueError: Invalidpropertyspecifiedforobjectof type plotly.graph_objs.Box: 'contours'
...
Badpropertypath:
contours_coloring^^^^^^^^

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