Add support for histfunc='kde' in px.histogram()
未关闭
还没有人认领这个 Issue。
feature
P3
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 16 小时 26 分钟
- 30 天内合并 PR
- 21
描述
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()

贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
从 px.histogram() 及其对 histfunc 的处理开始,然后使用 show_hist=False 和 show_rug=False 将所请求的输出与 figure_factory.create_distplot() 进行比较。确定 KDE 应如何表示,并将 histfunc='kde' 为分组数据生成所请求的曲线行为作为完成标准。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- python
- 领域
- data-visualization
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100