Color of Contour lines in Surfaces with colormap are not correctly set
オープン
まだ誰も着手していません。
bug
P3
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
I think there is an issue in the way the lines plot by a contours in a Surface object when selecting the color.
I think the color is not being correctly selected by each of the lines. They are supposed to follow the colorscale, but they just follows half of it.
Here there is a minimum example of code to simulate the error:
import numpy as np
import plotly.graph_objects as go
x = np.linspace(0, 1, 100)
y = np.linspace(0, 1, 100)
x_grid, y_grid = np.meshgrid(x, y)
z = x_grid + y_grid
params = {
'colorscale': 'rainbow',
'surfacecolor': z,
'showscale': True,
'colorbar': {
'title': 'z',
},
'contours_z': {
'show': True,
'usecolormap': True,
"project_z": True,
}
}
trace = go.Surface(
x=x,
y=y,
z=z,
**params)
fig = go.Figure(data=[trace])
fig.write_image("test.png")
fig.show()
In the example, the expected behavior will be for the contour lines to be the same color as the surface, but they are not.
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、plotly.graph_objects.Surface と contours_z を有効にした、提供されている Python の最小例を実行し、等高線の色とサーフェスの colorscale を比較します。Surface の等高線の色付け処理を追跡し、等高線が選択された colorscale 全体を使用していることを確認します。等高線が対応するサーフェスの色と一致すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100