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

Skip to content

Commit d35ebe6

Browse files
committed
pep8 on logo.py
1 parent fa2e492 commit d35ebe6

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

examples/pylab_examples/logo.py

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
# This file generates the matplotlib web page logo
22

3-
# from __future__ import print_function
4-
# Above import not necessary for Python 3 onwards. Recommend taking this out in all examples.
3+
# from __future__ import print_function
4+
# Above import not necessary for Python 3 onwards. Recommend taking this
5+
# out in all examples.
56
import matplotlib.pyplot as plt
6-
import numpy as np
7+
import numpy as np
78
import matplotlib.cbook as cbook
89

910
# convert data to mV
1011
datafile = cbook.get_sample_data('membrane.dat', asfileobj=False)
1112
print('loading', datafile)
1213

13-
x = 1000*0.1*np.fromstring(open(datafile, 'rb').read(), np.float32)
14+
x = 1000 * 0.1 * np.fromstring(open(datafile, 'rb').read(), np.float32)
1415
# 0.0005 is the sample interval
15-
t = 0.0005*np.arange(len(x))
16+
t = 0.0005 * np.arange(len(x))
1617
plt.figure(1, figsize=(7, 1), dpi=100)
1718
ax = plt.subplot(111, axisbg='y')
1819
plt.plot(t, x)
1920
plt.text(0.5, 0.5, 'matplotlib', color='r',
20-
fontsize=40, fontname=['Courier', 'Bitstream Vera Sans Mono'],
21-
horizontalalignment='center',
22-
verticalalignment='center',
23-
transform=ax.transAxes,
24-
)
21+
fontsize=40, fontname=['Courier', 'Bitstream Vera Sans Mono'],
22+
horizontalalignment='center',
23+
verticalalignment='center',
24+
transform=ax.transAxes,
25+
)
2526
plt.axis([1, 1.72, -60, 10])
2627
plt.setp(plt.gca(), 'xticklabels', [])
2728
plt.setp(plt.gca(), 'yticklabels', [])

0 commit comments

Comments
 (0)