I'm starting to learn matplotlib, following the pyplot tutorial, but something weird—I think—is happening in the very first part.
When I do this,
I just installed matplotlib 3.1.3 and I'm running Python 3.7.6 on Spyder 4.0.1
I see that, in this version of Spyder, I don't need to use
Thanks in advance.
When I do this,
import matplotlib.pyplot as plt plt.plot([1, 2, 3, 4]) plt.ylabel('some numbers') plt.show()
plt.plot([1, 2, 3, 4])
creates the figure, but plt.ylabel('some numbers')
creates another figure with the label but with no plot. Nothing about this is mentioned in the tutorial, and I have been reading about the plt functions to see if this is supposed to happen and/or how to fix it, but can't find anything. What can I do about this?I just installed matplotlib 3.1.3 and I'm running Python 3.7.6 on Spyder 4.0.1
I see that, in this version of Spyder, I don't need to use
plt.show()
, because all figures are shown in the 'Plots' pane.Thanks in advance.