Skip to content

some columns do not appear in hover if using labels overrides already used common names in Plotly Express #2562

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
emmanuelle opened this issue Jun 12, 2020 · 1 comment
Labels
bug something broken P3 backlog

Comments

@emmanuelle
Copy link
Contributor

Should we raise a warning or an error in the following case (which is very contrived of course)

import plotly.express as px
df = px.data.tips()
fig = px.scatter(df, x='tip', y='total_bill', color='day', facet_col='sex',
                 labels={'tip':'sex', 'day':'sex'})
fig.show()

in this case, in the hover only the value corresponding to x='tip' appears.

@nicolaskruchten
Copy link
Contributor

it's actually worse: the legend can get messed up also:

px.scatter(px.data.tips(), 
           x="total_bill", y="tip", 
           facet_row="day", facet_col="time", 
           symbol="sex", color="smoker", size="size",
          labels={x:"label" for x in px.data.tips().columns})

image

@gvwilson gvwilson self-assigned this Jun 17, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the P3 backlog label Aug 12, 2024
@gvwilson gvwilson changed the title px: some columns do not appear in hover if using labels overrides already used common names some columns do not appear in hover if using labels overrides already used common names in Plotly Express Aug 12, 2024
@gvwilson gvwilson added the bug something broken label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests

3 participants