@@ -51,26 +51,26 @@ def __init__(self):
51
51
# The below two timers must be attributes of self, so that the garbage
52
52
# collector won't clean them after we finish with __init__...
53
53
54
- # The data retrieval should be fast as possible (Using QRunnable should
55
- # be even faster)
56
- self .dataTimer = dynamic_canvas .new_timer (1 )
57
- self .dataTimer .add_callback (self ._update_data )
58
- self .dataTimer .start ()
54
+ # The data retrieval may be fast as possible (Using QRunnable could be
55
+ # even faster).
56
+ self .data_timer = dynamic_canvas .new_timer (1 )
57
+ self .data_timer .add_callback (self ._update_data )
58
+ self .data_timer .start ()
59
59
# Drawing at 50Hz should be fast enough for the GUI to feel smooth, and
60
60
# not too fast for the GUI to be overloaded with events that need to be
61
61
# processed while the GUI element is changed.
62
- self .drawingTimer = dynamic_canvas .new_timer (20 )
63
- self .drawingTimer .add_callback (self ._update_canvas )
64
- self .drawingTimer .start ()
62
+ self .drawing_timer = dynamic_canvas .new_timer (20 )
63
+ self .drawing_timer .add_callback (self ._update_canvas )
64
+ self .drawing_timer .start ()
65
65
66
66
def _update_data (self ):
67
67
# Shift the sinusoid as a function of time.
68
68
self .ydata = np .sin (self .xdata + time .time ())
69
69
70
70
def _update_canvas (self ):
71
71
self ._line .set_data (self .xdata , self .ydata )
72
- # It should be safe to use the synchronous draw() method as well for
73
- # most drawing frequencies, but it should be safer to use draw_idle().
72
+ # It should be safe to use the synchronous draw() method for most drawing
73
+ # frequencies, but it is safer to use draw_idle().
74
74
self ._line .figure .canvas .draw_idle ()
75
75
76
76
0 commit comments