Set barmode="overlay" in histograms by default to avoid misunderstandings
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
Reopening of #1865, as asked in the comment.
By default, histograms are not overlayed, which leads to misinterpretation :
import numpy as np
import pandas as pd
import plotly.express as px
x0 = np.random.randn(250)
# Add 1 to shift the mean of the Gaussian distribution
x1 = np.random.randn(250) + 1
df = pd.DataFrame(dict(
series=np.concatenate((["a"] * len(x0), ["b"] * len(x1))),
data=np.concatenate((x0, x1))
))
px.histogram(df, x="data", color="series")
Makes think that there is much more points in red distribution :
While overlying clearly shows that it is just shifted
px.histogram(df, x="data", color="series", barmode="overlay")
This leads to misunderstanding the data shape.
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 am Einstiegspunkt px.histogram und verfolge, wie der Standardwert für barmode ausgewählt wird, wenn color mehrere Serien erzeugt. Bestätige, dass sich der Standardwert zu overlay ändert, überprüfe anschließend das Verhalten des Beispiels mit den bereitgestellten pandas- und NumPy-Daten und füge relevante Tests hinzu oder aktualisiere sie, falls das Projekt eine Abdeckung für Histogramm-Standardwerte hat.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- data-visualization
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 42/100