Showing the plot window more than once

前端 未结 1 725
日久生厌
日久生厌 2021-01-14 08:27
import matplotlib
import pylab
x=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
y=[2, 4, 6, 8, 10, 12, 14, 16, 18, 20]
plotting=pylab.plot(x,y)
pylab.show(plotting)
相关标签:
1条回答
  • 2021-01-14 09:03

    Because when you close the window python tears down and deletes the figure. Calling show again does nothing because there is no figure to show.

    Passing an arguement to show like you do here does nothing (doc). The only argument that show takes is a key-word argument of block.

    0 讨论(0)
提交回复
热议问题