8000 explicit imports from plt · matplotlib/matplotlib@9e6d737 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9e6d737

Browse files
author
domspad
committed
explicit imports from plt
1 parent 88707e5 commit 9e6d737

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed
Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
from matplotlib.pyplot import figure, show, cm
2-
from numpy import where
3-
from numpy.random import rand
1+
import matplotlib.pyplot as plt
2+
import numpy as np
43

54
# the bar
6-
x = where(rand(500) > 0.7, 1.0, 0.0)
5+
x = np.where(np.random.rand(500) > 0.7, 1.0, 0.0)
76

87
axprops = dict(xticks=[], yticks=[])
9-
barprops = dict(aspect='auto', cmap=cm.binary, interpolation='nearest')
8+
barprops = dict(aspect='auto', cmap=plt.cm.binary, interpolation='nearest')
109

11-
fig = figure()
10+
fig = plt.figure()
1211

1312
# a vertical barcode -- this is broken at present
1413
x.shape = len(x), 1
@@ -22,4 +21,4 @@
2221
ax.imshow(x, **barprops)
2322

2423

25-
show()
24+
plt.show()

0 commit comments

Comments
 (0)
0