Skip to content

Add support for histfunc='kde' in px.histogram() #4057

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
janosh opened this issue Feb 3, 2023 · 0 comments
Open

Add support for histfunc='kde' in px.histogram() #4057

janosh opened this issue Feb 3, 2023 · 0 comments
Labels
feature something new P3 backlog

Comments

@janosh
Copy link
Contributor

janosh commented Feb 3, 2023

Would be great if the histfunc argument of px.histogram() accepted 'kde'. It's currently limited to ['count', 'sum', 'avg', 'min', 'max'] but I'm looking for output like what figure_factory.create_distplot() gives when show_hist=False, show_rug=False.

import plotly.figure_factory as ff
import numpy as np

x1 = np.random.randn(200) - 1
x2 = np.random.randn(200)
x3 = np.random.randn(200) + 1

hist_data = [x1, x2, x3]

group_labels = ['Group 1', 'Group 2', 'Group 3']
colors = ['#333F44', '#37AA9C', '#94F3E4']

# Create distplot with curve_type set to 'normal'
fig = ff.create_distplot(hist_data, group_labels, show_hist=False, show_rug=False, colors=colors)

# Add title
fig.update_layout(title_text='Curve and Rug Plot')
fig.show()

newplot

@AaronStiff AaronStiff added the feature something new label Feb 11, 2023
@gvwilson gvwilson self-assigned this Jul 5, 2024
@gvwilson gvwilson removed their assignment Aug 2, 2024
@gvwilson gvwilson added the P3 backlog label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new P3 backlog
Projects
None yet
Development

No branches or pull requests

3 participants