Pycharm does not show plot

后端 未结 25 1072
鱼传尺愫
鱼传尺愫 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:40

    I have found a solution. This worked for me:

    import numpy as np
    import matplotlib.pyplot as plt
    
    points = np.arange(-5, 5, 0.01)
    dx, dy = np.meshgrid(points, points)
    z = (np.sin(dx)+np.sin(dy))
    plt.imshow(z)
    plt.colorbar()
    plt.title('plot for sin(x)+sin(y)')
    plt.show()
    

提交回复
热议问题