How to update a plot in matplotlib?

后端 未结 7 1846
不思量自难忘°
不思量自难忘° 2020-11-22 02:11

I\'m having issues with redrawing the figure here. I allow the user to specify the units in the time scale (x-axis) and then I recalculate and call this function plots

7条回答
  •  无人共我
    2020-11-22 03:05

    This worked for me:

    from matplotlib import pyplot as plt
    from IPython.display import clear_output
    import numpy as np
    for i in range(50):
        clear_output(wait=True)
        y = np.random.random([10,1])
        plt.plot(y)
        plt.show()
    

提交回复
热议问题