enable global consistency of color mapping between animation frames
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- JavaScript
- Sterne
- 18.3k
- Forks
- 2k
- Ø Merge
- 2 T. 12 Std.
- Gemergte PRs (30 T.)
- 28
Beschreibung
Hi, Thanks for this AWESOME project. I really enjoy using it.
The animation function can't keep the global consistency of color mapping between animation frames.
Here is an example in Colab for my use case. In this example, I use Plotly.py with scatter_geo API. My code is as between,
import plotly.express as px
df = px.data.gapminder()
fig = px.scatter_geo(df, locations="iso_alpha",
color="lifeExp",
hover_name="country",
size="pop",
animation_frame="year",
projection="natural earth")
fig.show()
I expect the color mapping for lifeExp to keep consistent between different frames, which means the same color among frames should represent the same lifeExp value and the color bar should keep the same too. But the result looks like below, in which the frames in 1952 and 1997 can't be comparable.
I would expect some API like,
fig = px.scatter_geo(df, locations="iso_alpha",
color="lifeExp",
keep_color_global_consistency = True,
hover_name="country",
size="pop",
animation_frame="year",
projection="natural earth")
eg, it has keep_color_global_consistency option and the default value should be True.
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, das verknüpfte Colab-Beispiel mit scatter_geo, color und animation_frame zu reproduzieren. Lies nach, wie die Farbzuordnung und Farbbalken über Animationsframes hinweg gehandhabt werden, und definiere dann das API-Verhalten so, dass gleiche Werte vergleichbare Farben verwenden und der Farbbalken fixiert bleibt; abgeschlossen ist die Aufgabe, wenn die Frames von 1952 und 1997 direkt vergleichbar sind.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100