Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 407e362

Browse filesBrowse files
committed
STY: pep8 fixes to test_spines
1 parent 54abca4 commit 407e362
Copy full SHA for 407e362

File tree

Expand file treeCollapse file tree

1 file changed

+11
-9
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+11
-9
lines changed

‎lib/matplotlib/tests/test_spines.py

Copy file name to clipboardExpand all lines: lib/matplotlib/tests/test_spines.py
+11-9Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,35 +15,37 @@
1515
def test_spines_axes_positions():
1616
# SF bug 2852168
1717
fig = plt.figure()
18-
x = np.linspace(0,2*np.pi,100)
18+
x = np.linspace(0, 2*np.pi, 100)
1919
y = 2*np.sin(x)
20-
ax = fig.add_subplot(1,1,1)
20+
ax = fig.add_subplot(1, 1, 1)
2121
ax.set_title('centered spines')
22-
ax.plot(x,y)
23-
ax.spines['right'].set_position(('axes',0.1))
22+
ax.plot(x, y)
23+
ax.spines['right'].set_position(('axes', 0.1))
2424
ax.yaxis.set_ticks_position('right')
25-
ax.spines['top'].set_position(('axes',0.25))
25+
ax.spines['top'].set_position(('axes', 0.25))
2626
ax.xaxis.set_ticks_position('top')
2727
ax.spines['left'].set_color('none')
2828
ax.spines['bottom'].set_color('none')
2929

30+
3031
@image_comparison(baseline_images=['spines_data_positions'])
3132
def test_spines_data_positions():
3233
fig = plt.figure()
33-
ax = fig.add_subplot(1,1,1)
34+
ax = fig.add_subplot(1, 1, 1)
3435
ax.spines['left'].set_position(('data', -1.5))
3536
ax.spines['top'].set_position(('data', 0.5))
3637
ax.spines['right'].set_position(('data', -0.5))
3738
ax.spines['bottom'].set_position('zero')
38-
ax.set_xlim([-2,2])
39-
ax.set_ylim([-2,2])
39+
ax.set_xlim([-2, 2])
40+
ax.set_ylim([-2, 2])
41+
4042

4143
@image_comparison(baseline_images=['spines_capstyle'])
4244
def test_spines_capstyle():
4345
# issue 2542
4446
plt.rc('axes', linewidth=20)
4547
fig = plt.figure()
46-
ax = fig.add_subplot(1,1,1)
48+
ax = fig.add_subplot(1, 1, 1)
4749
ax.set_xticks([])
4850
ax.set_yticks([])
4951

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.