数据可视化之matplotlib实战:plt.stem()函数 绘制棉棒图

    科技2022-07-10  141

    import matplotlib.pyplot as plt import numpy as np x = np.linspace(0.5,2*np.pi,20) y = np.random.randn(20) plt.stem(x,y,linefmt="-.",markerfmt="o",basefmt="-") plt.show()

    Processed: 0.022, SQL: 8