Ho un oggetto fig2 che è una classe mathplotlib.axes.axessubplot, ma quando provo a eseguire fig2.show(), python dice che l'oggetto axessubplot non ha alcun attributo show. Come posso mostrare AxesSubplot? Come mostrare un AxesSubplot in Python?
9
A
risposta
13
È necessario chiamare matplotlib.pyplot.show()
, che è un metodo che visualizza tutte le cifre.
Se è stato importato come plt
, quindi:
import matplotlib.pyplot as plt
# create fig1 (of type plt.figure)
# create fig2
plt.show() # will display fig1 and fig2 in different windows
3
In alternativa, si potrebbe chiamare l'attributo figura di vostro fig2:
fig2.figure
Problemi correlati
- 1. Come mostrare i grafici matplotlib in python
- 2. Funzione equivalente per xticks per un oggetto AxesSubplot
- 3. Come mostrare google.com in un iframe?
- 4. Come "mostrare" un costruttore in minuscolo
- 5. Come nascondere/mostrare un processo in C#?
- 6. Come mostrare carte diverse in un CardLayout?
- 7. C'è un matplotlib.axes.AxesSubplot classe, ma le matplotlib.axes modulo ha alcun attributo AxesSubplot
- 8. WP7: Come mostrare un brindisi?
- 9. Come mostrare correttamente un balloontip?
- 10. Come mostrare più immagini in una figura?
- 11. Come mostrare un NSPanel come foglio
- 12. come posso mostrare un numero irrazionale a 100 posizioni decimali in python?
- 13. Come posso mostrare un viewbag come html?
- 14. Come mostrare gli avvisi in py.test
- 15. Mostrare un progressoBar in un popup
- 16. come mostrare Messagebox in MVVM
- 17. Come mostrare un messaggio popup come in Stack Overflow
- 18. Come mostrare un messaggio pop-up come in StackOverflow
- 19. come mostrare un messaggio all'attivazione plugin
- 20. Come salvare una trama in Seaborn con Python
- 21. Come nascondere/mostrare un processo usando C#?
- 22. Posso mostrare un oggetto UISegmentedControl in verticale?
- 23. Come rilevare IE6 e mostrare un avviso?
- 24. Come mostrare cosa ha fatto un commit?
- 25. Come mostrare un file PDF in una vista Django
- 26. Come mostrare un captcha in un'applicazione java swing
- 27. Come mostrare un messaggio di errore personalizzato in DropzoneJS?
- 28. Come mostrare un valore variabile in Web Form ASP.NET?
- 29. Come mostrare un suggerimento specifico in Visual Studio
- 30. Come mostrare tutti i privilegi di un utente in oracle?