plotly / plotly/plotly.py

Strange animation behavior with improperly specified color

Aperta
#4,194 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

bug P3
Lingua principale
Python
Stelle
18.8k
Fork
2.8k
Merge medio
16h 26m
PR unite (30g)
21

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia dalla riproduzione Colab collegata e confronta le animazioni scatter usando valori float di rgb() con redraw=True e redraw=False. Traccia come viene gestito il colore costante durante l’animazione rispetto a dopo un redraw, quindi stabilisci se i valori di colore malformati debbano essere normalizzati, rifiutati o gestiti in modo coerente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
data-visualization
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.