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
只返回元组( 线 , 标签 )当使用参数调用时,标签将以指定的径向距离和角度显示。参数: - radii带浮点数的元组
径向网格线的半径
- labels带字符串或无字符串的元组
用于每个径向网格线的标签。这个
matplotlib.ticker.ScalarFormatter
如果没有,将使用。- angle浮动
半径标签的角度位置(度)。
- fmtSTR或无
中使用的格式字符串
matplotlib.ticker.FormatStrFormatter
. 例如“%f”。
返回: - 线 名单
lines.Line2D
名单 径向网格线。
- 标签 名单
text.Text
名单 勾选标签。
其他参数: - **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' ))