px animations does not show correctly colors if all colors are not in the first frame
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
For example
import pandas as pd
import plotly.express as px
dataVals = {
'Lat': [39.783730, 7, 39.783730, 39.783730, 20, -4.03, 39.783730, 36.82, 39.783730],
'Lon': [-100.445882, 66, -100.445882, -100.445882, 70, 5.33, -100.445882, -1.29, -100.445882],
'Value': [40, 12, 22, 3, 60, 23, 30, 100, 200],
'Year': ['1985', '1990', '1990', '1990', '1990', '1990', '2000', '2000', '2000'],
'Continent Color': ["a", "b", "a", "a", "b", "c", "b", "d", "a"]
}
data = pd.DataFrame(dataVals)
fig = px.scatter_geo(data, lat="Lat", lon="Lon", size="Value", color="Continent Color",
animation_frame="Year", animation_group="Continent Color",
projection="natural earth", size_max=200)
fig.show()
(all points are displayed with the color of continent "a"). Reported by https://community.plot.ly/t/scatter-geo-only-shows-values-with-a-certain-color-if-i-have-multiple-years-as-the-same-year/35976. Other functions such as px.scatter have the same problem.
If all colors are used for the first frame, the problem disappears.
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 bereitgestellte pandas- und Plotly-Express-Beispiel auszuführen. Vergleiche anschließend px.scatter_geo mit px.scatter und verfolge dabei, wie Animationsframes und Farbwerte zusammengestellt werden. Als erledigt gilt die Aufgabe, wenn Farben, die nach dem ersten Frame eingeführt werden, in animierten Diagrammen mit ihren eigenen Farben gerendert werden, einschließlich des gemeldeten Beispiels.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- plotly, python
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100