Skip to content
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

x and y behavior in dx.histogram is not fully consistent with px.histogram #668

Open
jnumainville opened this issue Jul 25, 2024 · 0 comments · May be fixed by #1002
Open

x and y behavior in dx.histogram is not fully consistent with px.histogram #668

jnumainville opened this issue Jul 25, 2024 · 0 comments · May be fixed by #1002
Assignees
Labels
bug Something isn't working
Milestone

Comments

@jnumainville
Copy link
Collaborator

jnumainville commented Jul 25, 2024

This is similar, but not identical to, #451 (which also affects strip and box plots) as in that issue an error is thrown. Additionally, histograms are aggregated in engine, so this will have a significantly different fix.
Additionally, orientation needs to be added as an arg.
histfunc also behaves incorrectly - it should be called on the additional column (generally y unless orientation is "h")

Here is a set of representative calls that should be consistent with the dx equivalent

import plotly.express as px

df = px.data.tips()
fig = px.histogram(df, x="size", y="total_bill")
fig2 = px.histogram(df, x="size", y="total_bill", histfunc="count")
fig3 = px.histogram(df, x="size", y="total_bill", orientation="h")
fig4 = px.histogram(df, x="size", y="total_bill", orientation="h", histfunc="count")
fig5 = px.histogram(df, x=["tip", "total_bill"], y="size")
fig6 = px.histogram(df, x=["tip", "total_bill"], y="size", orientation="h")
fig7 = px.histogram(df, x="size", y=["tip", "total_bill"])
fig8 = px.histogram(df, x="size", y=["tip", "total_bill"], orientation="h")
fig9 = px.histogram(df, x=["tip", "total_bill"], y="size", histfunc="count")
fig10 = px.histogram(df, x=["tip", "total_bill"], y="size", orientation="h", histfunc="count")
fig11 = px.histogram(df, x="size", y=["tip", "total_bill"], histfunc="count")
fig12 = px.histogram(df, x="size", y=["tip", "total_bill"], orientation="h", histfunc="count")
@jnumainville jnumainville added bug Something isn't working triage labels Jul 25, 2024
@vbabich vbabich added this to the August 2024 milestone Jul 30, 2024
@vbabich vbabich removed the triage label Jul 30, 2024
@mofojed mofojed modified the milestones: August 2024, September 2024 Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants