Pycharm does not show plot

后端 未结 25 1067
鱼传尺愫
鱼传尺愫 2020-12-04 09:13

Pycharm does not show plot from the following code:

import pandas as pd
import numpy as np
import matplotlib as plt

ts = pd.Series(np.random.randn(1000), in         


        
25条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 09:14

    I tested in my version on PyCharm 2017.1.2. I used interactive (True) and show (block=True).

    import pandas as pd
    import numpy as np
    import matplotlib.pyplot as plt
    ts = pd.Series(np.random.randn(1000), index=pd.date_range('1//2000',periods=1000))
    ts = ts.cumsum()
    plt.interactive(True)
    ts.plot()
    plt.show(block=True)
    

提交回复
热议问题