【3.5.2】matplotlib-grid
grid
打开/关闭 axes 的栅格。
plt.grid(b=None, which=‘major’, axis=‘both’, **kwargs)
主要参数:
b:True、False 或 None,分别是打开栅格、关闭栅格、变更栅格状态(取反)
which:‘major’ 主、‘minor’ 次、‘both’ 两者都
axis:‘both’ 两者、‘x’ x 轴、‘y’ y 轴
plt.rgrids()
绘制角坐标图的栅格。
调用方式 | 说明 |
---|---|
rgrids() | 直接调用 |
lines, labels = rgrids( (0.25, 0.5, 1.0) ) | 规定详细的位置和规范 |
rgrids( (0.25, 0.5, 1.0), (‘Tom’, ‘Dick’, ‘Harry’ ) | 规定位置和标签 |
