特牛网址导航

Matplotlib 教程 之 Matplotlib Pyplot 5-阿里云开发者社区

网友收藏
Matplotlib 的子库 Pyplot 提供了类似 MATLAB 的绘图 API,是常用的 2D 图表绘制模块。通过 `import matplotlib.pyplot as plt` 导入后,可使用如 `plot()`, `scatter()`, `bar()`, `hist()`, `pie()`, `imshow()` 和 `subplots()` 等函数进行绘图。此外,Pyplot 还支持颜色、线型和标记等自定义选项。例如,使用 `plt.plot(xpoints, ypoints)` 即可绘制不规则线条。
标签:API Python