Skip to content

Commit eb95942

Browse files
committed
Pep8ify some variable names in examples.
1 parent c1a3c03 commit eb95942

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

examples/misc/demo_agg_filter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -261,15 +261,15 @@ def drop_shadow_line(ax):
261261
def drop_shadow_patches(ax):
262262
# Copied from barchart_demo.py
263263
N = 5
264-
menMeans = (20, 35, 30, 35, 27)
264+
men_means = [20, 35, 30, 35, 27]
265265

266266
ind = np.arange(N) # the x locations for the groups
267267
width = 0.35 # the width of the bars
268268

269-
rects1 = ax.bar(ind, menMeans, width, color='r', ec="w", lw=2)
269+
rects1 = ax.bar(ind, men_means, width, color='r', ec="w", lw=2)
270270

271-
womenMeans = (25, 32, 34, 20, 25)
272-
rects2 = ax.bar(ind + width + 0.1, womenMeans, width,
271+
women_means = [25, 32, 34, 20, 25]
272+
rects2 = ax.bar(ind + width + 0.1, women_means, width,
273273
color='y', ec="w", lw=2)
274274

275275
# gauss = GaussianFilter(1.5, offsets=(1,1), )

examples/specialty_plots/leftventricle_bulleye.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
import matplotlib.pyplot as plt
1313

1414

15-
def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
15+
def bullseye_plot(ax, data, seg_bold=None, cmap=None, norm=None):
1616
"""
1717
Bullseye representation for the left ventricle.
1818
@@ -21,7 +21,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
2121
ax : axes
2222
data : list of int and float
2323
The intensity values for each of the 17 segments
24-
segBold : list of int, optional
24+
seg_bold : list of int, optional
2525
A list with the segments to highlight
2626
cmap : ColorMap or None, optional
2727
Optional argument to set the desired colormap
@@ -42,8 +42,8 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
4242
nomenclature for tomographic imaging of the heart",
4343
Circulation, vol. 105, no. 4, pp. 539-542, 2002.
4444
"""
45-
if segBold is None:
46-
segBold = []
45+
if seg_bold is None:
46+
seg_bold = []
4747

4848
linewidth = 2
4949
data = np.array(data).ravel()
@@ -80,7 +80,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
8080
theta0 = np.repeat(theta0[:, np.newaxis], 2, axis=1)
8181
z = np.ones((128, 2)) * data[i]
8282
ax.pcolormesh(theta0, r0, z, cmap=cmap, norm=norm)
83-
if i + 1 in segBold:
83+
if i + 1 in seg_bold:
8484
ax.plot(theta0, r0, '-k', lw=linewidth + 2)
8585
ax.plot(theta0[0], [r[2], r[3]], '-k', lw=linewidth + 1)
8686
ax.plot(theta0[-1], [r[2], r[3]], '-k', lw=linewidth + 1)
@@ -94,7 +94,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
9494
theta0 = np.repeat(theta0[:, np.newaxis], 2, axis=1)
9595
z = np.ones((128, 2)) * data[i + 6]
9696
ax.pcolormesh(theta0, r0, z, cmap=cmap, norm=norm)
97-
if i + 7 in segBold:
97+
if i + 7 in seg_bold:
9898
ax.plot(theta0, r0, '-k', lw=linewidth + 2)
9999
ax.plot(theta0[0], [r[1], r[2]], '-k', lw=linewidth + 1)
100100
ax.plot(theta0[-1], [r[1], r[2]], '-k', lw=linewidth + 1)
@@ -108,7 +108,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
108108
theta0 = np.repeat(theta0[:, np.newaxis], 2, axis=1)
109109
z = np.ones((192, 2)) * data[i + 12]
110110
ax.pcolormesh(theta0, r0, z, cmap=cmap, norm=norm)
111-
if i + 13 in segBold:
111+
if i + 13 in seg_bold:
112112
ax.plot(theta0, r0, '-k', lw=linewidth + 2)
113113
ax.plot(theta0[0], [r[0], r[1]], '-k', lw=linewidth + 1)
114114
ax.plot(theta0[-1], [r[0], r[1]], '-k', lw=linewidth + 1)
@@ -120,7 +120,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
120120
theta0 = np.repeat(theta[:, np.newaxis], 2, axis=1)
121121
z = np.ones((theta.size, 2)) * data[16]
122122
ax.pcolormesh(theta0, r0, z, cmap=cmap, norm=norm)
123-
if 17 in segBold:
123+
if 17 in seg_bold:
124124
ax.plot(theta0, r0, '-k', lw=linewidth + 2)
125125

126126
ax.set_ylim([0, 1])
@@ -203,7 +203,7 @@ def bullseye_plot(ax, data, segBold=None, cmap=None, norm=None):
203203
bullseye_plot(ax[1], data, cmap=cmap2, norm=norm2)
204204
ax[1].set_title('Bulls Eye (AHA)')
205205

206-
bullseye_plot(ax[2], data, segBold=[3, 5, 6, 11, 12, 16],
206+
bullseye_plot(ax[2], data, seg_bold=[3, 5, 6, 11, 12, 16],
207207
cmap=cmap3, norm=norm3)
208208
ax[2].set_title('Segments [3,5,6,11,12,16] in bold')
209209

0 commit comments

Comments
 (0)