手册目录
Python 教程
Python 机器学习
Python MySQL
Matplotlib 的大部分实用程序位于 pyplot 子模块下,并且通常使用 plt 别名导入:
import matplotlib.pyplot as plt
现在可以将 Pyplot 包称为 plt。
在图表中从位置 (0,0) 绘制一条线到位置 (6,250):
import matplotlib.pyplot as plt import numpy as np xpoints = np.array([0, 6]) ypoints = np.array([0, 250]) plt.plot(xpoints, ypoints) plt.show()运行实例 »
点击 "运行实例" 按钮查看在线实例

在接下来的章节中,您将学习更多关于绘图的内容。
相关视频
科技资讯
24小时阅读榜
1
2
3
4
5
6
7
8
9
10
精品课程
共5课时 | 17.4万人学习
共49课时 | 78.2万人学习
共29课时 | 62.5万人学习
共25课时 | 39.7万人学习
共43课时 | 73.8万人学习