aspect="auto" for px.imshow does nothing when plotting RGB data
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 trying to plot an RGB image that strecthes to fill the figure, and I cannot get it to work.
Using a standard 2D array works as expected, and the image is able to dynamically stretch to the figure.
arr = np.random.random((100, 100))
px.imshow(arr, aspect="auto")
But if I instead try to plot an RGB image with the same settings, then the image stays with its original aspect ratio.
img = np.random.random((100, 100, 3))
px.imshow(img, aspect="auto")
In this case, setting the aspect key does nothing and the image keeps a fixed aspect ratio. Explicitly adding with and height also does nothing to change the aspect ratio.
Is this an expected limitation of the aspect setting? If yes, then it should probably be documented.
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 gli esempi di px.imshow nell’issue e confronta i percorsi 2D-array e RGB-array, concentrandoti su come viene gestito aspect="auto". Il lavoro è completato quando le immagini RGB si estendono come previsto, oppure quando vengono documentati il limite e il suo effetto su larghezza e altezza.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- numpy, 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
- 48/100