利用python的matplotlib模块作图

sushuaiqiang_82612 23 0 PDF 2020-12-23 06:12:43

Matplotlib是Python的绘图库,在日常工作和科研活动中经常需要用到,本博文会不定期更新一些常见的画图实例。 一、画散点图 给出一些点坐标,在二维坐标系上表示出来 import matplotlib.pyplot as plt #pyplot子模块提供了一系列API帮助画图 x = [2, 5, 8, 10, 14, 17, 22, 24, 27] #提供一系列点坐标 y = [1, 4, 6, 12, 15, 19, 21, 25, 28] plt.plot(x, y) #作图命令 plt.show()

用户评论
请输入评论内容
评分:
暂无评论