Unrenderable violin plot
オープン
まだ誰も着手していません。
bug
P2
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
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!
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、付属の df_melted.csv を Python 3.13.5 で提供された Python スクリプトに渡して実行し、次に test_plot.html を調べてノートブックのクラッシュを再現します。この入力に対するバイオリンプロットのレンダリングパスを追跡してください。生成された HTML がレンダリングされ、同じ図でノートブックがクラッシュしなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- pandas, plotly, python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100