File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
galleries/examples/user_interfaces Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -46,15 +46,15 @@ def __init__(self):
4646 self ._dynamic_ax = dynamic_canvas .figure .subplots ()
4747 # Set up a Line2D.
4848 self .xdata = np .linspace (0 , 10 , 101 )
49- self ._update_data ()
49+ self ._update_ydata ()
5050 self ._line , = self ._dynamic_ax .plot (self .xdata , self .ydata )
5151 # The below two timers must be attributes of self, so that the garbage
5252 # collector won't clean them after we finish with __init__...
5353
5454 # The data retrieval may be fast as possible (Using QRunnable could be
5555 # even faster).
5656 self .data_timer = dynamic_canvas .new_timer (1 )
57- self .data_timer .add_callback (self ._update_data )
57+ self .data_timer .add_callback (self ._update_ydata )
5858 self .data_timer .start ()
5959 # Drawing at 50Hz should be fast enough for the GUI to feel smooth, and
6060 # not too fast for the GUI to be overloaded with events that need to be
@@ -63,7 +63,7 @@ def __init__(self):
6363 self .drawing_timer .add_callback (self ._update_canvas )
6464 self .drawing_timer .start ()
6565
66- def _update_data (self ):
66+ def _update_ydata (self ):
6767 # Shift the sinusoid as a function of time.
6868 self .ydata = np .sin (self .xdata + time .time ())
6969
You can’t perform that action at this time.
0 commit comments