Imshow behaviour incorrect with log scale on yaxis
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 18.8k
- Fork
- 2.8k
- Merge medio
- 16h 26m
- PR unite (30g)
- 21
Descrizione
Plotly version: 5.15.0
I'm passing some values to the yaxis of px.imshow. If I just plot it as-is it's fine
import plotly.express as px
fig = px.imshow(
img = [[1,2], [3,4], [5,6]],
x = ['A', 'B'],
y = [10, 100, 1000],
text_auto=True,
width=600
)
fig.update_yaxes(autorange='reversed')
But if I change the yaxis type to log using fig.update_yaxis, the first row of data disappears
import plotly.express as px
fig = px.imshow(
img = [[1,2], [3,4], [5,6]],
x = ['A', 'B'],
y = [10, 100, 1000],
text_auto=True,
width=600
)
fig.update_yaxes(type='log', autorange='reversed')
Playing around with the yaxis values doesn't seem to affect this behaviour
Note: It seems to depend only on the closeness of the first and second yaxis values
VS
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 con l’esempio Python riproducibile usando px.imshow e fig.update_yaxes(type='log', autorange='reversed'), quindi confronta il rendering con scala logaritmica con il risultato con scala lineare. Il lavoro è completato quando la prima riga rimane visibile per i valori dell’asse y indicati, mentre l’autorange invertito e la scala logaritmica continuano a funzionare correttamente.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- python
- Ambito
- data-visualization
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 42/100