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

Skip to content

Commit bf3b1b4

Browse files
committed
pep8 fixes
1 parent 7ddc5ee commit bf3b1b4

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

examples/user_interfaces/embedding_in_qt4.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
# may be distributed without limitation.
1111

1212
from __future__ import unicode_literals
13-
import sys, os, random
13+
import sys
14+
import os
15+
import random
1416
from matplotlib.backends import qt4_compat
1517
use_pyside = qt4_compat.QT_API == qt4_compat.QT_API_PYSIDE
1618
if use_pyside:
@@ -62,18 +64,18 @@ class MyDynamicMplCanvas(MyMplCanvas):
6264
def __init__(self, *args, **kwargs):
6365
MyMplCanvas.__init__(self, *args, **kwargs)
6466
timer = QtCore.QTimer(self)
65-
if use_pyside:
67+
if use_pyside:
6668
timer.timeout.connect(self.update_figure)
6769
else:
6870
QtCore.QObject.connect(timer, QtCore.SIGNAL("timeout()"), self.update_figure)
6971
timer.start(1000)
7072

7173
def compute_initial_figure(self):
72-
self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r')
74+
self.axes.plot([0, 1, 2, 3], [1, 2, 0, 4], 'r')
7375

7476
def update_figure(self):
7577
# Build a list of 4 random integers between 0 and 10 (both inclusive)
76-
l = [ random.randint(0, 10) for i in range(4) ]
78+
l = [random.randint(0, 10) for i in range(4)]
7779

7880
self.axes.plot([0, 1, 2, 3], l, 'r')
7981
self.draw()

0 commit comments

Comments
 (0)