Unrenderable violin plot
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 52/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- pandas, plotly, python
调研方向
首先,在 Python 3.13.5 下使用附带的 df_melted.csv 运行提供的 Python 脚本,然后检查 test_plot.html 并复现 notebook 崩溃。跟踪此输入的 violin plot 渲染路径;生成的 HTML 能够正常渲染,并且同一个图形不再导致 notebooks 崩溃,即表示完成。
由索引模型根据 Issue 内容生成。
描述
I have some example input here and a script for creating a violin plot. The plot writes without error but appears unrenderable, it never displays and will e.g., cause notebooks to crash.
Python 3.13.5
plotly 6.0.1
pandas 2.2.3
import pandas as pd
import plotly.express as px
from plotly.graph_objects import Figure
def create_plot(df: pd.DataFrame) -> Figure:
fig = px.violin(
df,
color='sample',
color_discrete_sequence=px.colors.qualitative.Safe,
y='value',
x='sample',
points=False,
box=True,
facet_col='metric',
facet_col_wrap=1,
)
fig.update_yaxes(matches=None)
fig.update_xaxes(matches=None)
fig.update_layout(height=400 * len(df['metric'].unique()))
return fig
if __name__ == '__main__':
file = 'df_melted.csv'
df = pd.read_csv(file)
fig = create_plot(df)
fig.write_html('test_plot.html')
Example input file is attached. The input is admittedly unusual for a violin plot (essentially all 0s or all 1s).
Thanks in advance!
- 主要语言
- Python
- 星标
- 18.8k
- 派生
- 2.8k
- 平均合并
- 13 小时 41 分钟
- 30 天内合并 PR
- 21
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
plotly/plotly.py 的其他 Issue
-
P3 size: 1 task
难度 2/5 1-3 小时 新手友好度 65/100
-
P3 size: 1 task
难度 2/5 1-3 小时 新手友好度 72/100
-
bug P1
难度 1/5 1 小时以内 新手友好度 68/100
-
feature P3
难度 2/5 1-3 小时 新手友好度 62/100
-
feature P3
难度 2/5 1-3 小时 新手友好度 72/100
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 90/100
learningequality/ricecooker#747 ·
-
难度 2/5 1-3 小时 新手友好度 68/100
BSData/horus-heresy-3rd-edition#3171 ·
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
-
难度 2/5 1-3 小时 新手友好度 76/100
run-llama/llama_index#23199 ·
-
难度 2/5 1-3 小时 新手友好度 84/100
KhronosGroup/glTF-Blender-IO#2769 ·