enable setting px.scatter error bars of same color as the marker
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 am making an error bar plot using px.scatter. I want to set each error bar to the same color as the marker. Below is the code showing how I am making the scatter plot. As can be seen from the code, I have a continuous scale and the markers are colored based on the column 'size' from my dataframe. I have looked quite a lot in the plotly documentation but I am unable to find a way to set the error bars of the same color as the marker. Is there a fix for this? Does plotly support different colored error bars for continuous data? Any help or suggestions would be appreciated.
I have also attached a link to the screenshot of the plot (the plot is zoomed in). As can be seen from the plot, the markers have colors based on the continuous scale whereas the all the lines have the same color.
df = pd.read_csv(options['file'], sep = ',')
size = df['size'].to_list()
fig = px.scatter(df,
x = "start",
y = "rank",
error_x = "duration",
render_mode = 'auto',
facet_row = 'api',
category_orders ={"api": ["MPIIO", "POSIX"]})
fig.update_traces(
marker = dict(
color= size,
colorscale = "portland",
colorbar=dict(
title = "Request Size <br>(Bytes)",
thickness=20
),
showscale=True
),
error_x = dict(
width = 0,
symmetric=False,
),
)
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
Riproducete l’esempio px.scatter segnalato con colori continui dei marker e error_x abilitato, partendo dalle chiamate a px.scatter e fig.update_traces mostrate nell’issue. Determinate se Plotly supporta la mappatura dei colori continui dei marker sulle barre di errore e considerate il lavoro completo quando l’esempio produce barre di errore corrispondenti al colore di ciascun marker oppure quando la limitazione è documentata con una spiegazione chiara.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- 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
- 35/100