本文簡要介紹 python 語言中matplotlib.backend_bases.FigureCanvasBase.new_timer
的用法。
-
創建
Timer
的新 backend-specific 子類。這對於通過後端的本機事件循環獲取周期性事件很有用。僅針對帶有 GUI 的後端實施。
- 參數:
- interval int
-
以毫秒為單位的計時器間隔。
- callbacks 列表[元組[可調用,元組,字典]]
-
(func, args, kwargs) 的序列,其中
func(*args, **kwargs)
將由計時器每隔interval
執行一次。返回
False
或0
的回調將從計時器中刪除。
例子
>>> timer = fig.canvas.new_timer(callbacks=[(f1, (1,), {'a': 3})])
用法
new_timer(interval=None, callbacks=None)
相關用法
- Python matplotlib FigureCanvasBase.mpl_connect用法及代碼示例
- Python matplotlib FigureCanvasBase.mpl_disconnect用法及代碼示例
- Python matplotlib Figure.set_size_inches用法及代碼示例
- Python matplotlib Figure.add_axes用法及代碼示例
- Python matplotlib FigureBase.subplots用法及代碼示例
- Python matplotlib FigureBase.align_ylabels用法及代碼示例
- Python matplotlib FigureBase.align_xlabels用法及代碼示例
- Python matplotlib FigureBase.add_axes用法及代碼示例
- Python matplotlib FigureMpl用法及代碼示例
- Python matplotlib FigureBase.legend用法及代碼示例
- Python matplotlib Figure.figimage用法及代碼示例
- Python matplotlib Figure.add_subplot用法及代碼示例
- Python matplotlib Figure.legend用法及代碼示例
- Python matplotlib FigureBase.sticky_edges用法及代碼示例
- Python matplotlib FigureBase.add_subplot用法及代碼示例
- Python matplotlib Figure.savefig用法及代碼示例
- Python matplotlib Figure.colorbar用法及代碼示例
- Python matplotlib Figure.add_gridspec用法及代碼示例
- Python matplotlib Figure.sticky_edges用法及代碼示例
- Python matplotlib FigureBase.colorbar用法及代碼示例
- Python matplotlib Figure.subplots用法及代碼示例
- Python matplotlib Figure.align_ylabels用法及代碼示例
- Python matplotlib Figure.align_xlabels用法及代碼示例
- Python matplotlib FigureBase.add_gridspec用法及代碼示例
- Python matplotlib FontManager用法及代碼示例
注:本文由純淨天空篩選整理自skytowner.com大神的英文原創作品 matplotlib.backend_bases.FigureCanvasBase.new_timer。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。