Skip to content

Commit

Permalink
pep8 fix E124-E129
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Hisch <t.hisch@gmail.com>
  • Loading branch information
twmr committed Nov 15, 2014
1 parent eef2efc commit 6289558
Show file tree
Hide file tree
Showing 69 changed files with 280 additions and 280 deletions.
6 changes: 3 additions & 3 deletions examples/api/scatter_piecharts.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@

fig, ax = plt.subplots()
ax.scatter(np.arange(3), np.arange(3), marker=(xy1, 0),
s=[s1*s1*_ for _ in sizes], facecolor='blue')
s=[s1*s1*_ for _ in sizes], facecolor='blue')
ax.scatter(np.arange(3), np.arange(3), marker=(xy2, 0),
s=[s2*s2*_ for _ in sizes], facecolor='green')
s=[s2*s2*_ for _ in sizes], facecolor='green')
ax.scatter(np.arange(3), np.arange(3), marker=(xy3, 0),
s=[s3*s3*_ for _ in sizes], facecolor='red')
s=[s3*s3*_ for _ in sizes], facecolor='red')

plt.show()
2 changes: 1 addition & 1 deletion examples/axes_grid/demo_floating_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import mpl_toolkits.axisartist.angle_helper as angle_helper
from matplotlib.projections import PolarAxes
from mpl_toolkits.axisartist.grid_finder import (FixedLocator, MaxNLocator,
DictFormatter)
DictFormatter)
import matplotlib.pyplot as plt


Expand Down
2 changes: 1 addition & 1 deletion examples/event_handling/data_browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
self.text = ax.text(0.05, 0.95, 'selected: none',
transform=ax.transAxes, va='top')
self.selected, = ax.plot([xs[0]], [ys[0]], 'o', ms=12, alpha=0.4,
color='yellow', visible=False)
color='yellow', visible=False)

def onpress(self, event):
if self.lastind is None:
Expand Down
10 changes: 5 additions & 5 deletions examples/event_handling/pipong.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ def __init__(self, ax):
self.pads.append(Pad(pB, padBx, padBy, 'r'))
self.pucks = []
self.i = self.ax.annotate(instructions, (.5, 0.5),
name='monospace',
verticalalignment='center',
horizontalalignment='center',
multialignment='left',
textcoords='axes fraction', animated=True)
name='monospace',
verticalalignment='center',
horizontalalignment='center',
multialignment='left',
textcoords='axes fraction', animated=True)
self.canvas.mpl_connect('key_press_event', self.key_press)

def draw(self, evt):
Expand Down
2 changes: 1 addition & 1 deletion examples/event_handling/zoom_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

axsrc = figsrc.add_subplot(111, xlim=(0, 1), ylim=(0, 1), autoscale_on=False)
axzoom = figzoom.add_subplot(111, xlim=(0.45, 0.55), ylim=(0.4, .6),
autoscale_on=False)
autoscale_on=False)
axsrc.set_title('Click to zoom')
axzoom.set_title('zoom window')
x, y, s, c = numpy.random.rand(4, 200)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
big_im = plt.imread(big_im_path)
# Define small image
small_im = np.array([[0.25, 0.75, 1.0, 0.75], [0.1, 0.65, 0.5, 0.4],
[0.6, 0.3, 0.0, 0.2], [0.7, 0.9, 0.4, 0.6]])
[0.6, 0.3, 0.0, 0.2], [0.7, 0.9, 0.4, 0.6]])

# Create a 2x2 table of plots
fig = plt.figure(figsize=[8.0, 7.5])
Expand All @@ -33,7 +33,7 @@
ax = plt.subplot(2, 2, 4)
ax.imshow(small_im, interpolation='nearest')
plt.subplots_adjust(left=0.24, wspace=0.2, hspace=0.1,
bottom=0.05, top=0.86)
bottom=0.05, top=0.86)

# Label the rows and columns of the table
fig.text(0.03, 0.645, 'Big Image\nScaled Down', ha='left')
Expand Down
2 changes: 1 addition & 1 deletion examples/misc/contour_manual.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# Points can be ordered clockwise or anticlockwise.
filled01 = [[[0, 0], [0, 4], [1, 3], [1, 2], [2, 0]]]
filled12 = [[[2, 0], [3, 0], [3, 2], [1, 3], [1, 2]], # Note two polygons.
[[1, 4], [3, 4], [3, 3]]]
[[1, 4], [3, 4], [3, 3]]]


plt.figure()
Expand Down
26 changes: 13 additions & 13 deletions examples/misc/rc_traits.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
flexible_true_trait = traits.Trait(
True,
{'true': True, 't': True, 'yes': True, 'y': True, 'on': True, True: True,
'false': False, 'f': False, 'no': False, 'n': False, 'off': False, False: False
})
'false': False, 'f': False, 'no': False, 'n': False, 'off': False, False: False
})
flexible_false_trait = traits.Trait(False, flexible_true_trait)

colors = {
Expand Down Expand Up @@ -95,7 +95,7 @@ def float_to_rgba(ob, name, val):


Color = traits.Trait(RGBA(), float_to_rgba, colorname_to_rgba, RGBA,
hex_to_rgba, tuple_to_rgba)
hex_to_rgba, tuple_to_rgba)


def file_exists(ob, name, val):
Expand All @@ -105,14 +105,14 @@ def file_exists(ob, name, val):
linestyles = ('-', '--', '-.', ':', 'steps', 'None')
TICKLEFT, TICKRIGHT, TICKUP, TICKDOWN = range(4)
linemarkers = (None, '.', ',', 'o', '^', 'v', '<', '>', 's',
'+', 'x', 'd', 'D', '|', '_', 'h', 'H',
'p', '1', '2', '3', '4',
TICKLEFT,
TICKRIGHT,
TICKUP,
TICKDOWN,
'None'
)
'+', 'x', 'd', 'D', '|', '_', 'h', 'H',
'p', '1', '2', '3', '4',
TICKLEFT,
TICKRIGHT,
TICKUP,
TICKDOWN,
'None'
)


class LineRC(traits.HasTraits):
Expand All @@ -136,8 +136,8 @@ class PatchRC(traits.HasTraits):

timezones = 'UTC', 'US/Central', 'ES/Eastern' # fixme: and many more
backends = ('GTKAgg', 'Cairo', 'GDK', 'GTK', 'Agg',
'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg',
'WX')
'GTKCairo', 'PS', 'SVG', 'Template', 'TkAgg',
'WX')


class RC(traits.HasTraits):
Expand Down
4 changes: 2 additions & 2 deletions examples/misc/rec_join_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

# Create a new array
r2 = np.empty(12, dtype=[('date', '|O4'), ('high', np.float),
('marker', np.float)])
('marker', np.float)])
r2 = r2.view(np.recarray)
r2.date = r.date[-17:-5]
r2.high = r.high[-17:-5]
Expand All @@ -27,5 +27,5 @@

for s in ('inner', 'outer', 'leftouter'):
rec = mlab.rec_join(['date', 'high'], r1, r2,
jointype=s, defaults=defaults)
jointype=s, defaults=defaults)
print("\n%sjoin :\n%s" % (s, mlab.rec2txt(rec)))
2 changes: 1 addition & 1 deletion examples/mplot3d/mixed_subplots_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def f(t):
Z = np.sin(R)

surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1,
linewidth=0, antialiased=False)
linewidth=0, antialiased=False)

ax.set_zlim3d(-1, 1)

Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/polys3d_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
verts.append(list(zip(xs, ys)))

poly = PolyCollection(verts, facecolors=[cc('r'), cc('g'), cc('b'),
cc('y')])
cc('y')])
poly.set_alpha(0.7)
ax.add_collection3d(poly, zs=zs, zdir='y')

Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/subplot3d_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
linewidth=0, antialiased=False)
ax.set_zlim3d(-1.01, 1.01)

fig.colorbar(surf, shrink=0.5, aspect=10)
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/surface3d_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)
surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, cmap=cm.coolwarm,
linewidth=0, antialiased=False)
linewidth=0, antialiased=False)
ax.set_zlim(-1.01, 1.01)

ax.zaxis.set_major_locator(LinearLocator(10))
Expand Down
2 changes: 1 addition & 1 deletion examples/mplot3d/surface3d_demo3.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
colors[x, y] = colortuple[(x + y) % len(colortuple)]

surf = ax.plot_surface(X, Y, Z, rstride=1, cstride=1, facecolors=colors,
linewidth=0, antialiased=False)
linewidth=0, antialiased=False)

ax.set_zlim3d(-1, 1)
ax.w_zaxis.set_major_locator(LinearLocator(6))
Expand Down
8 changes: 4 additions & 4 deletions examples/pie_and_polar_charts/pie_demo_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
import numpy as np

ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
autopct='%1.1f%%', shadow=True, startangle=90,
autopct='%1.1f%%', shadow=True, startangle=90,
radius=0.25, center=(0, 0), frame=True)
ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
autopct='%1.1f%%', shadow=True, startangle=90,
autopct='%1.1f%%', shadow=True, startangle=90,
radius=0.25, center=(1, 1), frame=True)
ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
autopct='%1.1f%%', shadow=True, startangle=90,
autopct='%1.1f%%', shadow=True, startangle=90,
radius=0.25, center=(0, 1), frame=True)
ax.pie(np.random.random(4), explode=explode, labels=labels, colors=colors,
autopct='%1.1f%%', shadow=True, startangle=90,
autopct='%1.1f%%', shadow=True, startangle=90,
radius=0.25, center=(1, 0), frame=True)

ax.set_xticks([0, 1])
Expand Down
2 changes: 1 addition & 1 deletion examples/pylab_examples/anchored_artists.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from matplotlib.patches import Rectangle, Ellipse

from matplotlib.offsetbox import AnchoredOffsetbox, AuxTransformBox, VPacker,\
TextArea, DrawingArea
TextArea, DrawingArea


class AnchoredText(AnchoredOffsetbox):
Expand Down
2 changes: 1 addition & 1 deletion examples/pylab_examples/annotation_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
horizontalalignment='left',
verticalalignment='bottom',
clip_on=True, # clip to the axes bounding box
)
)

ax.set_xlim(-20, 20)
ax.set_ylim(-20, 20)
Expand Down
54 changes: 27 additions & 27 deletions examples/pylab_examples/annotation_demo2.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
)

ann = ax.annotate('', xy=(4., 1.), xycoords='data',
xytext=(4.5, -1), textcoords='data',
arrowprops=dict(arrowstyle="<->",
connectionstyle="bar",
ec="k",
shrinkA=5, shrinkB=5,
)
)
xytext=(4.5, -1), textcoords='data',
arrowprops=dict(arrowstyle="<->",
connectionstyle="bar",
ec="k",
shrinkA=5, shrinkB=5,
)
)


if 1:
Expand Down Expand Up @@ -126,28 +126,28 @@
)

ann = ax.annotate('wedge', xy=(2., -1), xycoords='data',
xytext=(0, -45), textcoords='offset points',
size=20,
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec=(1., .5, .5)),
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
fc=(1.0, 0.7, 0.7), ec=(1., .5, .5),
patchA=None,
patchB=el,
relpos=(0.2, 0.8),
connectionstyle="arc3,rad=-0.1"),
)
xytext=(0, -45), textcoords='offset points',
size=20,
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec=(1., .5, .5)),
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
fc=(1.0, 0.7, 0.7), ec=(1., .5, .5),
patchA=None,
patchB=el,
relpos=(0.2, 0.8),
connectionstyle="arc3,rad=-0.1"),
)

ann = ax.annotate('wedge', xy=(2., -1), xycoords='data',
xytext=(35, 0), textcoords='offset points',
size=20, va="center",
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec="none"),
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
fc=(1.0, 0.7, 0.7), ec="none",
patchA=None,
patchB=el,
relpos=(0.2, 0.5),
)
)
xytext=(35, 0), textcoords='offset points',
size=20, va="center",
bbox=dict(boxstyle="round", fc=(1.0, 0.7, 0.7), ec="none"),
arrowprops=dict(arrowstyle="wedge,tail_width=1.",
fc=(1.0, 0.7, 0.7), ec="none",
patchA=None,
patchB=el,
relpos=(0.2, 0.5),
)
)


show()
Loading

0 comments on commit 6289558

Please sign in to comment.