go.Histogram2dContour does not normalize when using shared coloraxis and coloring='fill'
オープン
まだ誰も着手していません。
bug
P3
sev-2
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
Setup:
plotly==5.18.0
Bug:
When adding two go.Histogram2dContour to a subplot, the colorscale is not normalized, when using a shared coloraxis and setting coloring='fill'.
It works when setting coloring='heatmap'.
Dataframes used:
df_a = pd.DataFrame({
'a':[0,0,1,1],
'b':[0,1,0,1],
'c':[0,1,2,3],
})
df_b = pd.DataFrame({
'a':[0,0,1,1],
'b':[0,1,0,1],
'c':[10,20,30,40],
})
Example coloring='fill':
Example coloring='heatmap':
Code:
fig = make_subplots(rows=1,cols=2)
fig.add_trace(
go.Histogram2dContour(
x=df_a['a'].to_list(),
y=df_a['b'].to_list(),
z=df_a['c'].to_list(),
# contours=dict(coloring="heatmap"),
contours=dict(coloring="fill"),
coloraxis="coloraxis",
showscale=True,
showlegend=False,
histfunc='max',
),
row=1,
col=1
)
fig.add_trace(
go.Histogram2dContour(
x=df_b['a'].to_list(),
y=df_b['b'].to_list(),
z=df_b['c'].to_list(),
# contours=dict(coloring="heatmap"),
contours=dict(coloring="fill"),
coloraxis="coloraxis",
showscale=True,
showlegend=False,
histfunc='max',
),
row=1,
col=2
)
fig.show()
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、2つの go.Histogram2dContour トレースを使用する、提供された plotly==5.18.0 の再現コードを実行し、coloring='fill' と coloring='heatmap' を比較します。各モードで共有 coloraxis の正規化がどのように適用されるかを追跡します。両方の fill contour が2つのサブプロット間で共有 colorscale を一貫して使用すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100