@@ -143,28 +143,30 @@ def test_inverted_cla():
143
143
# plotting an image, then 1d graph, axis is now down
144
144
fig = plt .figure (0 )
145
145
ax = fig .gca ()
146
- # test that a new axis is not inverted per default
146
+ # 1. test that a new axis is not inverted per default
147
147
assert not (ax .xaxis_inverted ())
148
148
assert not (ax .yaxis_inverted ())
149
149
img = np .random .random ((100 , 100 ))
150
150
ax .imshow (img )
151
- # test that a image axis is inverted
151
+ # 2. test that a image axis is inverted
152
152
assert not (ax .xaxis_inverted ())
153
153
assert ax .yaxis_inverted ()
154
+ # 3. test that clearing and plotting a line, axes are
155
+ # not inverted
154
156
ax .cla ()
155
157
x = np .linspace (0 , 2 * np .pi , 100 )
156
158
ax .plot (x , np .cos (x ))
157
159
assert not (ax .xaxis_inverted ())
158
160
assert not (ax .yaxis_inverted ())
159
161
160
- # autoscaling should not bring back axes to normal
162
+ # 4. autoscaling should not bring back axes to normal
161
163
ax .cla ()
162
164
ax .imshow (img )
163
165
plt .autoscale ()
164
166
assert not (ax .xaxis_inverted ())
165
167
assert ax .yaxis_inverted ()
166
168
167
- # two shared axes. Clearing the master axis should bring axes in shared
169
+ # 5. two shared axes. Clearing the master axis should bring axes in shared
168
170
# axies back to normal
169
171
ax0 = plt .subplot (211 )
170
172
ax1 = plt .subplot (212 , sharey = ax0 )
@@ -173,7 +175,7 @@ def test_inverted_cla():
173
175
ax0 .cla ()
174
176
assert not (ax1 .yaxis_inverted ())
175
177
ax1 .cla ()
176
- # clearing the nonmaster should not touch limits
178
+ # 6. clearing the nonmaster should not touch limits
177
179
ax0 .imshow (img )
178
180
ax1 .plot (x , np .cos (x ))
179
181
ax1 .cla ()
0 commit comments