Box Plot line color changes the fill color as well, unless fill color is specified
オープン
まだ誰も着手していません。
bug
P3
- 主要言語
- Python
- スター
- 18.8k
- フォーク
- 2.8k
- 平均マージ
- 16時間 26分
- マージ済み PR(30日)
- 21
説明
When setting the line color for a box plot, it also makes the fill color of the box plot the same as the line color (with a different opacity I think). This is the case unless the fill color is set explicitly, but this doesn't help if for example your using a layout template for your colors. In my example below for the expected output I have to use a color picker to get the color of the default theme then put that into the fillcolor argument.
import plotly.graph_objects as go
import plotly.data
from plotly.subplots import make_subplots
data = plotly.data.iris()
fig = make_subplots(rows = 3, cols = 1, shared_xaxes=True)
fig.add_traces([
go.Box(
x = data["species"],
y = data["sepal_length"],
name = "no line color"
),
go.Box(
x = data["species"],
y = data["sepal_length"],
line = {"color":"black"},
name = "line color = black"
),
go.Box(
x = data["species"],
y = data["sepal_length"],
fillcolor = "#a4adf8", #shouldnt need to do this
line = {"color":"black"},
name = "expected"
)
], rows = [1,2,3], cols = [1,1,1])
fig

コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
まず、提供されている Python の再現コードを plotly.graph_objects.Box で実行し、line.color と fillcolor の相互作用に注目して 3 つのトレースを比較します。box plot の線の色を設定してもデフォルトの塗りつぶし色が変わらず、fillcolor を指定しなくても期待される例が動作すれば、修正は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100