Skip to content

Commit a46ecad

Browse files
authored
Rename _update_data to _update_ydata
1 parent b86e35e commit a46ecad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

galleries/examples/user_interfaces/embedding_in_qt_sgskip.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)