matplotlib.pyplot.rgrids#
- matplotlib.pyplot.rgrids(radii=None, labels=None, angle=None, fmt=None, **kwargs)[source]#
获取或设置当前极坐标图上的径向网格线。
调用签名
lines, labels = rgrids() lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs)
在不带参数调用时,
rgrids
仅返回元组 (lines, labels)。在带参数调用时,标签将出现在指定的径向距离和角度上。- 参数:
- radii浮点数元组
径向网格线的半径。
- labels字符串元组或 None
在每个径向网格线处使用的标签。如果为None,将使用
matplotlib.ticker.ScalarFormatter
。- angle浮点数
径向标签的角度位置(以度为单位)。
- fmt字符串或 None
在
matplotlib.ticker.FormatStrFormatter
中使用的格式字符串。例如 '%f'。
- 返回:
- lines
lines.Line2D
列表 径向网格线。
- labels
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' ))