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

Skip to content

Commit 58064c3

Browse files
committed
Merge pull request #4653 from domspad/MEP12-on-alignment_test.py
MEP12 on alignment_test.py
2 parents c4abea9 + 98d3a17 commit 58064c3

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

examples/pylab_examples/alignment_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
layout text
66
"""
77

8-
from pylab import *
8+
import matplotlib.pyplot as plt
99
from matplotlib.lines import Line2D
1010
from matplotlib.patches import Rectangle
1111

@@ -14,8 +14,8 @@
1414
bottom, height = .25, .5
1515
right = left + width
1616
top = bottom + height
17-
ax = gca()
18-
p = Rectangle((left, bottom), width, height,
17+
ax = plt.gca()
18+
p = plt.Rectangle((left, bottom), width, height,
1919
fill=False,
2020
)
2121
p.set_transform(ax.transAxes)
@@ -77,6 +77,6 @@
7777
rotation=45,
7878
transform=ax.transAxes)
7979

80-
axis('off')
80+
plt.axis('off')
8181

82-
show()
82+
plt.show()

0 commit comments

Comments
 (0)