Home > front end >  Pyplot .plot function generates immediate graph. plt.plot() seems to do nothing
Pyplot .plot function generates immediate graph. plt.plot() seems to do nothing

Time:01-19

For some reason plots are generated when i run a single line (F9 in Spyder). So in the sequence hereunder first a line plot is generated. The second line generates an empty plot,but with the y-label,and the plt.show() does nothing. Yesterday i tried making a very simple animation. used export to file. I since then made a total new installation. Reinstalled Anaconda I am using Anaconda, Python 3.9.7 matplotlib 3.4.3, Ipython 7.29.0,spyder 3.9.7

What am I missing?

plt.plot([1, 2, 3, 4])  #this line makes a simple line plot
plt.ylabel('some numbers') #executing thins line makes a new empty plot with the label
plt.show()  #nothing happens

The Graph

  •  Tags:  
  • Related