matplotlib.pyplot.rgrids#
- matplotlib.pyplot.rgrids(radii=None, labels=None, angle=None, fmt=None, **kwargs)[源代码][源代码]#
获取或设置当前极坐标图上的径向网格线。
调用签名:
lines, labels = rgrids() lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs)
当不带参数调用时,
rgrids仅返回元组(lines, labels)。当带参数调用时,标签将出现在指定的径向距离和角度处。- 参数:
- 半径包含浮点数的元组
径向网格线的半径
- 标签包含字符串或 None 的元组
每个径向网格线使用的标签。如果为 None,将使用
matplotlib.ticker.ScalarFormatter。- 角度float
半径标签的角位置,以度为单位。
- fmtstr 或 None
在
matplotlib.ticker.FormatStrFormatter中使用的格式字符串。例如 '%f'。
- 返回:
- lines :
lines.Line2D的列表列表 径向网格线。
- 标签 :
text.Text的列表列表 刻度标签。
- lines :
- 其他参数:
- **kwargs
kwargs 是标签的可选
Text属性。
示例
# set the locations of the radial gridlines lines, labels = rgrids( (0.25, 0.5, 1.0) ) # set the locations and labels of the radial gridlines lines, labels = rgrids( (0.25, 0.5, 1.0), ('Tom', 'Dick', 'Harry' ))