matplotlib.pyplot.plot(*args, scalex=True, scaley=True, data=None, **kwargs)官方给出的参数,链接如下:官方链接

这里我们不对所有参数进行介绍,直介绍一些常用的、感兴趣的介绍一下。

import numpy as np
import matplotlib.pyplot as plt

通过上面的代码导入库

x = np.array([1,2,3,4,5,6,7,8])
y = np.array([3,5,7,6,2,6,10,15])
lines = plt.plot(x,y,'-.or',label="line5",lw=2,markersize=6)# 
plt.legend(handles=lines)  #添加Label
plt.title('Line demo')   #添加标题
plt.show()

Matplotlib库学习之plt.plot()笔记

相关文章:

  • 2021-10-04
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2021-12-27
  • 2021-07-09
猜你喜欢
  • 2022-12-23
  • 2021-12-27
  • 2021-12-12
  • 2021-10-25
  • 2021-07-11
相关资源
相似解决方案