ecdf with normed histogram
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 18.8k
- Fork
- 2.8k
- Merge medio
- 16h 26m
- PR unite (30g)
- 21
Descrizione
I really like the plotly.express.ecdf and have been using it a lot in my daily work.
When I show ecdf plots in meetings, I usually show it with marginal='histogram', since this is easier understandable for the non-data-scientists in the room.
However, since the amount of data varies I would like to have a normalized histogram, i.e. have percent values.
I know this would be possible with subplots, but there are really a lot of ugly adjustments to make.
So a solution could be to show the percentage in the hint as well, or something like histnorm from plotly.express.histogram.
Example for easy testing:
import plotly.express as px
import numpy as np
import pandas as pd
# Generate random data
np.random.seed(42) # For reproducibility
data = np.random.normal(loc=0, scale=1, size=1000) # Normal distribution data
# Create a pandas dataframe
df = pd.DataFrame({'Values': data})
# Create ECDF plot with histogram
fig = px.ecdf(data,
ecdfnorm='percent',
marginal='histogram')
# Show the figure
fig.show()
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia dal punto di ingresso px.ecdf e confronta come viene configurato marginal='histogram' con histnorm in px.histogram. Determina se il comportamento previsto consiste nell’avere bin marginali normalizzati o informazioni percentuali nell’hover, quindi verifica il risultato con l’esempio fornito di NumPy e pandas; il lavoro è completato quando il marginal dell’istogramma ECDF può rappresentare percentuali senza subplots manuali.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- numpy, pandas, plotly, python
- Ambito
- data-visualization
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 38/100