diff --git a/examples/pylab_examples/alignment_test.py b/examples/pylab_examples/alignment_test.py index 52343b09ebd3..3173a9c97a71 100644 --- a/examples/pylab_examples/alignment_test.py +++ b/examples/pylab_examples/alignment_test.py @@ -5,7 +5,7 @@ layout text """ -from pylab import * +import matplotlib.pyplot as plt from matplotlib.lines import Line2D from matplotlib.patches import Rectangle @@ -14,8 +14,8 @@ bottom, height = .25, .5 right = left + width top = bottom + height -ax = gca() -p = Rectangle((left, bottom), width, height, +ax = plt.gca() +p = plt.Rectangle((left, bottom), width, height, fill=False, ) p.set_transform(ax.transAxes) @@ -77,6 +77,6 @@ rotation=45, transform=ax.transAxes) -axis('off') +plt.axis('off') -show() +plt.show()