Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1151391

Browse files
committed
DOC: add example
1 parent 9b37674 commit 1151391

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2408,13 +2408,19 @@ def new_timer(self, *args, **kwargs):
24082408
----------------
24092409
interval : scalar
24102410
Timer interval in milliseconds
2411+
24112412
callbacks : List[Tuple[callable, Tuple, Dict]]
24122413
Sequence of (func, args, kwargs) where ``func(*args, **kwargs)``
24132414
will be executed by the timer every *interval*.
24142415
24152416
callbacks which return ``False`` or ``0`` will be removed from the
24162417
timer.
24172418
2419+
Examples
2420+
--------
2421+
2422+
>>> timer = fig.canvas.new_timer(callbacks=[(f1, (1, ), {'a': 3}),])
2423+
24182424
"""
24192425
return TimerBase(*args, **kwargs)
24202426

0 commit comments

Comments
 (0)