本文簡要介紹 python 語言中 matplotlib.pyplot.thetagrids
的用法。
-
獲取或設置當前極坐標圖上的 theta 網格線。
調用簽名:
lines, labels = thetagrids() lines, labels = thetagrids(angles, labels=None, fmt=None, **kwargs)
當不帶參數調用時,
thetagrids
僅返回元組(lines
、labels
)。當使用參數調用時,標簽將以指定的角度出現。- 參數:
- angles 帶浮點數、度數的元組
-
theta 網格線的角度。
- labels 帶字符串或無的元組
-
在每個徑向網格線上使用的標簽。如果沒有,將使用
projections.polar.ThetaFormatter
。 - fmt str 或 None
-
matplotlib.ticker.FormatStrFormatter
中使用的格式字符串。例如'%f'。請注意,將使用以弧度為單位的角度。
- 返回:
- lines
lines.Line2D
列表 -
theta 網格線。
- labels
text.Text
列表 -
刻度標簽。
- lines
- 其他參數:
- **kwargs
-
kwargs
是標簽的可選Text
屬性。
例子
# set the locations of the angular gridlines lines, labels = thetagrids(range(45, 360, 90)) # set the locations and labels of the angular gridlines lines, labels = thetagrids(range(45, 360, 90), ('NE', 'NW', 'SW', 'SE'))
用法
matplotlib.pyplot.thetagrids(angles=None, labels=None, fmt=None, **kwargs)
相關用法
- Python matplotlib triplot用法及代碼示例
- Python matplotlib tricontourf用法及代碼示例
- Python matplotlib tick_params用法及代碼示例
- Python matplotlib tricontour用法及代碼示例
- Python matplotlib tripcolor用法及代碼示例
- Python matplotlib text用法及代碼示例
- Python matplotlib axvspan用法及代碼示例
- Python matplotlib Axes.get_legend_handles_labels用法及代碼示例
- Python matplotlib AbstractMovieWriter用法及代碼示例
- 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.thetagrids。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。