本文簡要介紹 python 語言中 matplotlib.dates.YearLocator
的用法。
-
基礎:
RRuleLocator
在每年的給定日期打勾,這是基數的倍數。
例子:
# Tick every year on Jan 1st locator = YearLocator() # Tick every 5 years on July 4th locator = YearLocator(5, month=7, day=4)
- 參數:
- base 整數,默認值:1
-
標記每
base
年標記一次。 - month 整數,默認值:1
-
放置刻度的月份,從 1 開始。默認為一月。
- day 整數,默認值:1
-
放置刻度線的日期。
- tz str 或
tzinfo
,默認值:rcParams["timezone"]
(默認值:'UTC'
) -
勾選時區。如果是字符串,則將
tz
傳遞給dateutil.tz
。
用法
class matplotlib.dates.YearLocator(base=1, month=1, day=1, tz=None)
相關用法
- 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用法及代碼示例
- Python matplotlib PolyQuadMesh.set_hatch用法及代碼示例
- Python matplotlib warn_deprecated用法及代碼示例
- Python matplotlib Text.set_bbox用法及代碼示例
- Python matplotlib Axes.inset_axes用法及代碼示例
- Python matplotlib delete_parameter用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.dates.YearLocator。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。