plotly / plotly/plotly.py

Strange animation behavior with improperly specified color

オープン
#4,194 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug P3
主要言語
Python
スター
18.8k
フォーク
2.8k
平均マージ
16時間 26分
マージ済み PR(30日)
21

説明

When a scatter line color is specified using rgb() with float values in [0, 1] rather than integers in [0, 255], it seems to actually produce the expected color. However, when animating a scatter trace with a constant color specified this way, it turns to black during the animation. If the animation sets redraw=True it will go back to the "correct" color after the transition completes, but if redraw=False then it stays black.

Here's a colab that demonstrates the issue: https://colab.research.google.com/drive/1enQGu6ProJg22F9KxAwsewf7UvbS3fkF?usp=sharing

I'm not sure if the correct fix to this is to make the animations work the same way as for correctly specified colors or to make incorrectly specified colors always show up as black (i.e. get cast to ints) or raise an error. The current situation results in a difficult to debug behavior.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

リンクされた Colab の再現手順から始め、rgb() の float 値を使用した scatter アニメーションを redraw=True と redraw=False で比較します。アニメーション中と redraw 後で定数カラーがどのように扱われるかを追跡し、そのうえで、不正なカラー値を正規化、拒否、または一貫して処理すべきかを明らかにします。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
python
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。