px.ecdf // x_log leads to shifted marginal histogram
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
When trying to display a marginal histogram combined with log_x = true, the histogram does not seem to get placed correclty.
Minimal reproducible example (plotly 5.4.0):
import plotly.express as px
import pandas as pd
import numpy as np
df = pd.DataFrame({'data': np.random.randn(10000)+8})
fig = px.ecdf(df, x='data', marginal='histogram', log_x=True)
fig.show()
I expect the histogram's median at 8 (normal distribution with offset of 8), but it is placed somewhere at more than 11. The actual ecdf is displayed correctly. With log_x = False, both the histogram and the ecdf are displayed correctly.
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 minimale px.ecdf-Beispiel aus dem Issue auszuführen, und untersuche die Behandlung des marginalen Histogramms, wenn log_x=True ist. Verfolge anschließend die Pfade für die Platzierung von ECDF und Histogramm und füge dann einen Regressionstest hinzu, der zeigt, dass der Median des Histogramms mit den Quelldaten übereinstimmt, während ECDF korrekt bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- numpy, pandas, 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