本文簡要介紹 python 語言中 matplotlib.pyplot.rgrids
的用法。
-
獲取或設置當前極坐標圖上的徑向網格線。
調用簽名:
lines, labels = rgrids() lines, labels = rgrids(radii, labels=None, angle=22.5, fmt=None, **kwargs)
當不帶參數調用時,
rgrids
僅返回元組(lines
、labels
)。當使用參數調用時,標簽將出現在指定的徑向距離和角度處。- 參數:
- radii 帶浮點數的元組
-
徑向網格線的半徑
- labels 帶字符串或無的元組
-
在每個徑向網格線上使用的標簽。如果沒有,將使用
matplotlib.ticker.ScalarFormatter
。 - angle 浮點數
-
半徑標簽的角度位置,以度為單位。
- fmt str 或 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' ))
用法
matplotlib.pyplot.rgrids(radii=None, labels=None, angle=None, fmt=None, **kwargs)
相關用法
- Python matplotlib register_cmap用法及代碼示例
- Python matplotlib rc用法及代碼示例
- Python matplotlib rc_context用法及代碼示例
- Python matplotlib rename_parameter用法及代碼示例
- Python matplotlib relativedelta用法及代碼示例
- Python matplotlib axvspan用法及代碼示例
- Python matplotlib Axes.get_legend_handles_labels用法及代碼示例
- Python matplotlib AbstractMovieWriter用法及代碼示例
- Python matplotlib triplot用法及代碼示例
- Python matplotlib StarPolygonCollection.set_hatch用法及代碼示例
- Python matplotlib Axes.hist用法及代碼示例
- Python matplotlib boxplot用法及代碼示例
- Python matplotlib subplots用法及代碼示例
- Python matplotlib InsetPosition用法及代碼示例
- Python matplotlib ToolManager.toolmanager_disconnect用法及代碼示例
- Python matplotlib Figure.set_size_inches用法及代碼示例
- Python matplotlib figlegend用法及代碼示例
- Python matplotlib Axes.step用法及代碼示例
- Python matplotlib Axes.contour用法及代碼示例
- Python matplotlib LassoSelector用法及代碼示例
- Python matplotlib BrokenBarHCollection.set_hatch用法及代碼示例
- Python matplotlib Axes.plot用法及代碼示例
- Python matplotlib Axes.semilogx用法及代碼示例
- Python matplotlib Axes.semilogy用法及代碼示例
- Python matplotlib MovieWriterRegistry.register用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.pyplot.rgrids。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。