Skip to content

Commit 19eeb22

Browse files
committed
fix E221 pep8 errors
1 parent 5756fbf commit 19eeb22

17 files changed

+44
-44
lines changed

examples/color/color_cycle_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
yy = np.transpose([np.sin(x + phi) for phi in offsets])
1818

1919
plt.rc('lines', linewidth=4)
20-
fig, (ax0, ax1) = plt.subplots(nrows=2)
20+
fig, (ax0, ax1) = plt.subplots(nrows=2)
2121

2222
plt.rc('axes', color_cycle=['r', 'g', 'b', 'y'])
2323
ax0.plot(yy)

examples/misc/contour_manual.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
plt.figure()
4141
filled01 = [ [[0,0],[3,0],[3,3],[0,3],[1,1],[1,2],[2,2],[2,1]] ]
42-
kinds01 = [ [1,2,2,2,1,2,2,2] ]
42+
kinds01 = [ [1,2,2,2,1,2,2,2] ]
4343
cs = ContourSet(plt.gca(), [0,1], [filled01], [kinds01], filled=True)
4444
cbar = plt.colorbar(cs)
4545

examples/misc/rc_traits.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def file_exists(ob, name, val):
102102
fh = file(val, 'r')
103103
return val
104104

105-
linestyles = ('-', '--', '-.', ':', 'steps', 'None')
105+
linestyles = ('-', '--', '-.', ':', 'steps', 'None')
106106
TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN = range(4)
107107
linemarkers = (None, '.', ',', 'o', '^', 'v', '<', '>', 's',
108108
'+', 'x', 'd', 'D', '|', '_', 'h', 'H',
@@ -116,23 +116,23 @@ def file_exists(ob, name, val):
116116

117117

118118
class LineRC(traits.HasTraits):
119-
linewidth = traits.Float(0.5)
120-
linestyle = traits.Trait(*linestyles)
121-
color = Color
122-
marker = traits.Trait(*linemarkers)
119+
linewidth = traits.Float(0.5)
120+
linestyle = traits.Trait(*linestyles)
121+
color = Color
122+
marker = traits.Trait(*linemarkers)
123123
markerfacecolor = Color
124124
markeredgecolor = Color
125125
markeredgewidth = traits.Float(0.5)
126-
markersize = traits.Float(6)
127-
antialiased = flexible_true_trait
128-
data_clipping = flexible_false_trait
126+
markersize = traits.Float(6)
127+
antialiased = flexible_true_trait
128+
data_clipping = flexible_false_trait
129129

130130

131131
class PatchRC(traits.HasTraits):
132-
linewidth = traits.Float(1.0)
132+
linewidth = traits.Float(1.0)
133133
facecolor = Color
134134
edgecolor = Color
135-
antialiased = flexible_true_trait
135+
antialiased = flexible_true_trait
136136

137137
timezones = 'UTC', 'US/Central', 'ES/Eastern' # fixme: and many more
138138
backends = ('GTKAgg', 'Cairo', 'GDK', 'GTK', 'Agg',
@@ -142,11 +142,11 @@ class PatchRC(traits.HasTraits):
142142

143143
class RC(traits.HasTraits):
144144
backend = traits.Trait(*backends)
145-
interactive = flexible_false_trait
146-
toolbar = traits.Trait('toolbar2', 'classic', None)
147-
timezone = traits.Trait(*timezones)
148-
lines = traits.Trait(LineRC())
149-
patch = traits.Trait(PatchRC())
145+
interactive = flexible_false_trait
146+
toolbar = traits.Trait('toolbar2', 'classic', None)
147+
timezone = traits.Trait(*timezones)
148+
lines = traits.Trait(LineRC())
149+
patch = traits.Trait(PatchRC())
150150

151151
rc = RC()
152152
rc.lines.color = 'r'

examples/pylab_examples/bar_stacked.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55

66

77
N = 5
8-
menMeans = (20, 35, 30, 35, 27)
8+
menMeans = (20, 35, 30, 35, 27)
99
womenMeans = (25, 32, 34, 20, 25)
10-
menStd = (2, 3, 4, 1, 2)
11-
womenStd = (3, 5, 2, 3, 3)
10+
menStd = (2, 3, 4, 1, 2)
11+
womenStd = (3, 5, 2, 3, 3)
1212
ind = np.arange(N) # the x locations for the groups
1313
width = 0.35 # the width of the bars: can also be len(x) sequence
1414

examples/pylab_examples/finance_work2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,12 @@ def moving_average_convergence(x, nslow=26, nfast=12):
9696

9797

9898
fig = plt.figure(facecolor='white')
99-
axescolor = '#f6f6f6' # the axes background color
99+
axescolor = '#f6f6f6' # the axes background color
100100

101101
ax1 = fig.add_axes(rect1, axisbg=axescolor) #left, bottom, width, height
102102
ax2 = fig.add_axes(rect2, axisbg=axescolor, sharex=ax1)
103103
ax2t = ax2.twinx()
104-
ax3 = fig.add_axes(rect3, axisbg=axescolor, sharex=ax1)
104+
ax3 = fig.add_axes(rect3, axisbg=axescolor, sharex=ax1)
105105

106106

107107
### plot the relative strength indicator

examples/pylab_examples/fonts_demo.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434

3535
### Show style options
3636

37-
style = ['normal', 'italic', 'oblique']
37+
style = ['normal', 'italic', 'oblique']
3838

3939
t = text(-0.4, 0.9, 'style', fontproperties=font1,
4040
**alignment)
@@ -75,8 +75,8 @@
7575

7676
### Show size options
7777

78-
size = ['xx-small', 'x-small', 'small', 'medium', 'large',
79-
'x-large', 'xx-large']
78+
size = ['xx-small', 'x-small', 'small', 'medium', 'large',
79+
'x-large', 'xx-large']
8080

8181
t = text( 0.8, 0.9, 'size', fontproperties=font1,
8282
**alignment)

examples/pylab_examples/fonts_demo_kw.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
### Show style options
2828

29-
style = ['normal', 'italic', 'oblique']
29+
style = ['normal', 'italic', 'oblique']
3030

3131
t = text(-0.4, 0.9, 'style', **alignment)
3232

@@ -56,8 +56,8 @@
5656

5757
### Show size options
5858

59-
size = ['xx-small', 'x-small', 'small', 'medium', 'large',
60-
'x-large', 'xx-large']
59+
size = ['xx-small', 'x-small', 'small', 'medium', 'large',
60+
'x-large', 'xx-large']
6161

6262
t = text( 0.8, 0.9, 'size', **alignment)
6363

examples/pylab_examples/image_slices_viewer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ def __init__(self, ax, X):
1010

1111
self.X = X
1212
rows,cols,self.slices = X.shape
13-
self.ind = self.slices/2
13+
self.ind = self.slices/2
1414

1515
self.im = ax.imshow(self.X[:,:,self.ind])
1616
self.update()

examples/pylab_examples/line_collection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
# If linestyle is omitted, 'solid' is used
3232
# See matplotlib.collections.LineCollection for more information
3333
line_segments = LineCollection(segs,
34-
linewidths = (0.5,1,1.5,2),
34+
linewidths = (0.5,1,1.5,2),
3535
colors = [colorConverter.to_rgba(i) \
3636
for i in ('b','g','r','c','m','y','k')],
3737
linestyle = 'solid')

examples/pylab_examples/line_collection2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# If linestyle is omitted, 'solid' is used
2323
# See matplotlib.collections.LineCollection for more information
2424
line_segments = LineCollection([list(zip(x,y)) for y in ys], # Make a sequence of x,y pairs
25-
linewidths = (0.5,1,1.5,2),
25+
linewidths = (0.5,1,1.5,2),
2626
linestyles = 'solid')
2727
line_segments.set_array(x)
2828
ax.add_collection(line_segments)

examples/pylab_examples/major_minor_demo1.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@
3434
import numpy as np
3535
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
3636

37-
majorLocator = MultipleLocator(20)
37+
majorLocator = MultipleLocator(20)
3838
majorFormatter = FormatStrFormatter('%d')
39-
minorLocator = MultipleLocator(5)
39+
minorLocator = MultipleLocator(5)
4040

4141

4242
t = np.arange(0.0, 100.0, 0.1)

examples/pylab_examples/major_minor_demo2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# minorLocator = AutoMinorLocator(2)
1717
# would lead to a single minor tick between major ticks.
1818

19-
minorLocator = AutoMinorLocator()
19+
minorLocator = AutoMinorLocator()
2020

2121

2222
t = np.arange(0.0, 100.0, 0.01)

examples/pylab_examples/multiline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
text(2, 7,'this is\nyet another test',
1515
rotation=45,
1616
horizontalalignment = 'center',
17-
verticalalignment = 'top',
18-
multialignment = 'center')
17+
verticalalignment = 'top',
18+
multialignment = 'center')
1919

2020
grid(True)
2121

examples/pylab_examples/scatter_hist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
x = np.random.randn(1000)
77
y = np.random.randn(1000)
88

9-
nullfmt = NullFormatter() # no labels
9+
nullfmt = NullFormatter() # no labels
1010

1111
# definitions for the axes
1212
left, width = 0.1, 0.65

examples/user_interfaces/interactive2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def write(self,text):
133133

134134
end = self.buffer.get_end_iter()
135135

136-
if not self.view == None:
136+
if not self.view == None:
137137
self.view.scroll_to_mark(self.mark, 0, True, 1, 1)
138138

139139
self.buffer.insert_with_tags(end,text,self.style)

examples/user_interfaces/mpl_with_glade.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717

1818
def simple_msg(msg, parent=None, title=None):
1919
dialog = gtk.MessageDialog(
20-
parent = None,
21-
type = gtk.MESSAGE_INFO,
22-
buttons = gtk.BUTTONS_OK,
20+
parent = None,
21+
type = gtk.MESSAGE_INFO,
22+
buttons = gtk.BUTTONS_OK,
2323
message_format = msg)
2424
if parent is not None:
2525
dialog.set_transient_for(parent)
@@ -58,8 +58,8 @@ def __init__(self):
5858
self.canvas.show()
5959
self.canvas.set_size_request(600, 400)
6060
self.canvas.set_events(
61-
gtk.gdk.BUTTON_PRESS_MASK |
62-
gtk.gdk.KEY_PRESS_MASK |
61+
gtk.gdk.BUTTON_PRESS_MASK |
62+
gtk.gdk.KEY_PRESS_MASK |
6363
gtk.gdk.KEY_RELEASE_MASK
6464
)
6565
self.canvas.set_flags(gtk.HAS_FOCUS|gtk.CAN_FOCUS)

examples/widgets/slider_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
axcolor = 'lightgoldenrodyellow'
1515
axfreq = plt.axes([0.25, 0.1, 0.65, 0.03], axisbg=axcolor)
16-
axamp = plt.axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor)
16+
axamp = plt.axes([0.25, 0.15, 0.65, 0.03], axisbg=axcolor)
1717

1818
sfreq = Slider(axfreq, 'Freq', 0.1, 30.0, valinit=f0)
1919
samp = Slider(axamp, 'Amp', 0.1, 10.0, valinit=a0)

0 commit comments

Comments
 (0)