mirror of
https://github.com/Estom/notes.git
synced 2026-02-07 12:35:20 +08:00
matplotlib 整理
This commit is contained in:
@@ -11,6 +11,15 @@
|
||||
* 调整刻度位置:ax.xaxis.set_ticks_position()/ax.yaxis.set_ticks_position()
|
||||
* 调整边框(坐标轴)位置:ax.spines[].set_position()
|
||||
|
||||
|
||||
## 交互命令绘图方法原理
|
||||
matplotlib.pyplot是使 matplotlib 像 MATLAB 一样工作的函数集合。每个pyplot函数都会对图形进行一些更改:例如,创建图形、在图形中创建绘图区域、在绘图区域中绘制一些线、用标签装饰绘图等。
|
||||
|
||||
在matplotlib.pyplot函数调用中保留各种状态,以便它跟踪诸如当前图形和绘图区域之类的内容,并且绘图函数被定向到当前轴(请注意,此处和文档中大多数地方的“轴”是指到图形的轴 部分, 而不是多个轴的严格数学术语)。
|
||||
|
||||
|
||||
|
||||
|
||||
## 导入模块
|
||||
|
||||
* 使用import导入模块matplotlib.pyplot,并简写成plt;使用import导入模块numpy,并简写成np
|
||||
Reference in New Issue
Block a user