8000 Apply suggestions from code review · matplotlib/matplotlib@28af910 · GitHub
[go: up one dir, main page]

Skip to content

Commit 28af910

Browse files
doronbeharQuLogic
andauthored
Apply suggestions from code review
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parent 7af1d83 commit 28af910

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

galleries/examples/user_interfaces/embedding_in_qt_sgskip.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,26 +51,26 @@ def __init__(self):
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

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()
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
6161
# 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()
6565

6666
def _update_data(self):
6767
# Shift the sinusoid as a function of time.
6868
self.ydata = np.sin(self.xdata + time.time())
6969

7070
def _update_canvas(self):
7171
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().
7474
self._line.figure.canvas.draw_idle()
7575

7676

0 commit comments

Comments
 (0)
0