Python: matplotlib - loop, clear and show different plots over the same figure

前端 未结 2 479
南旧
南旧 2020-12-10 09:14

I want to see how a plot varies with different values using a loop. I want to see it on the same plot. But i do not want to remains of the previous plot in the figure. In MA

2条回答
  •  自闭症患者
    2020-12-10 09:52

    If you call plt.show() inside the loop you will see the plot for each element on the loop as long as you close the window containing the figure. The process, will be plot for the first element, then if you close the window you will see the plot for the second element in the loop, etc

提交回复
热议问题