Skip to content

Commit af46f05

Browse files
committed
fix pylab_examples/axes_zoom_effect.py
svn path=/trunk/matplotlib/; revision=8783
1 parent 008b765 commit af46f05

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

examples/pylab_examples/axes_zoom_effect.py

+12-14
Original file line numberDiff line numberDiff line change
@@ -100,21 +100,19 @@ def zoom_effect02(ax1, ax2, **kwargs):
100100
return c1, c2, bbox_patch1, bbox_patch2, p
101101

102102

103-
if __name__ == "__main__":
104-
import matplotlib.pyplot as plt
103+
import matplotlib.pyplot as plt
105104

106-
plt.figure(1, figsize=(5,5))
107-
ax1 = plt.subplot(221)
108-
ax2 = plt.subplot(212)
109-
ax2.set_xlim(0, 1)
110-
ax2.set_xlim(0, 5)
111-
zoom_effect01(ax1, ax2, 0.2, 0.8)
105+
plt.figure(1, figsize=(5,5))
106+
ax1 = plt.subplot(221)
107+
ax2 = plt.subplot(212)
108+
ax2.set_xlim(0, 1)
109+
ax2.set_xlim(0, 5)
110+
zoom_effect01(ax1, ax2, 0.2, 0.8)
112111

113112

114-
ax1 = plt.subplot(222)
115-
ax1.set_xlim(2, 3)
116-
ax2.set_xlim(0, 5)
117-
zoom_effect02(ax1, ax2)
118-
119-
plt.show()
113+
ax1 = plt.subplot(222)
114+
ax1.set_xlim(2, 3)
115+
ax2.set_xlim(0, 5)
116+
zoom_effect02(ax1, ax2)
120117

118+
plt.show()

0 commit comments

Comments
 (0)