本文簡要介紹 python 語言中 matplotlib.axis.Axis.get_tick_params
的用法。
-
獲取刻度、刻度標簽和網格線的外觀參數。
3.7 版中的新函數。
- 參數:
- which {'major', 'minor'},默認:'major'
-
檢索其參數的刻度組。
- 返回:
- dict
-
添加到軸的刻度元素樣式屬性。
注意
此方法返回添加到此軸的
new
元素樣式的外觀參數,如果用戶直接修改它們(例如,通過各個刻度對象上的set_*
方法),則可能與當前元素上的值不同。例子
>>> ax.yaxis.set_tick_params(labelsize=30, labelcolor='red', direction='out', which='major') >>> ax.yaxis.get_tick_params(which='major') {'direction': 'out', 'left': True, 'right': False, 'labelleft': True, 'labelright': False, 'gridOn': False, 'labelsize': 30, 'labelcolor': 'red'} >>> ax.yaxis.get_tick_params(which='minor') {'left': True, 'right': False, 'labelleft': True, 'labelright': False, 'gridOn': False}
用法
Axis.get_tick_params(which='major')
相關用法
- Python matplotlib AxisArtist.toggle用法及代碼示例
- Python matplotlib AxisArtist.set_axisline_style用法及代碼示例
- Python matplotlib AxisArtistHelper用法及代碼示例
- Python matplotlib AxislineStyle用法及代碼示例
- Python matplotlib Axes.get_legend_handles_labels用法及代碼示例
- Python matplotlib Axes.hist用法及代碼示例
- Python matplotlib Axes.step用法及代碼示例
- Python matplotlib Axes.contour用法及代碼示例
- Python matplotlib Axes.plot用法及代碼示例
- Python matplotlib Axes.semilogx用法及代碼示例
- Python matplotlib Axes.semilogy用法及代碼示例
- Python matplotlib Axes.inset_axes用法及代碼示例
- Python matplotlib Axes.axis用法及代碼示例
- Python matplotlib Axes.barbs用法及代碼示例
- Python matplotlib Axes.tripcolor用法及代碼示例
- Python matplotlib Axes.set_prop_cycle用法及代碼示例
- Python matplotlib Axes.axline用法及代碼示例
- Python matplotlib Axes.tick_params用法及代碼示例
- Python matplotlib Axes.axvspan用法及代碼示例
- Python matplotlib Axes3D.plot_trisurf用法及代碼示例
- Python matplotlib Axes3D.text2D用法及代碼示例
- Python matplotlib Axes.contourf用法及代碼示例
- Python matplotlib Axes.tricontourf用法及代碼示例
- Python matplotlib Axes.locator_params用法及代碼示例
- Python matplotlib Axes.set_ylim用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.axis.Axis.get_tick_params。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。