安装好matplotlib和numpy后就可以直接在idle上写代码画图了

>>> import matplotlib.pyplot as plt
>>> import numpy as np
>>> n=np.linspace(0,25,125)
>>> y2=2*n
>>> plt.figure()
<Figure size 640x480 with 0 Axes>
>>> plt.plot(n,y1)
[<matplotlib.lines.Line2D object at 0x01749850>]
>>> plt.ylabel('some numbers')
Text(0, 0.5, 'some numbers')
>>> plt.show()

参考了https://morvanzhou.github.io/tutorials/

python绘图

相关文章:

  • 2021-04-05
  • 2021-07-06
  • 2022-02-21
  • 2021-08-20
  • 2021-08-24
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2021-05-13
  • 2021-10-09
  • 2021-10-30
相关资源
相似解决方案