File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -1261,6 +1261,14 @@ def __clear(self):
1261
1261
# deprecation on cla() subclassing expires.
1262
1262
1263
1263
# stash the current visibility state
1264
+
1265
+ # A twinx-copied axis title set to the right will move back the
1266
+ # left if it is cleared.
1267
+ set_right_label_again = False
1268
+ if 'y' in self ._axis_map :
1269
+ set_right_label_again = \
1270
+ (self ._axis_map ['y' ].get_label_position () == 'right' )
1271
+
1264
1272
if hasattr (self , 'patch' ):
1265
1273
patch_visible = self .patch .get_visible ()
1266
1274
else :
@@ -1378,6 +1386,9 @@ def __clear(self):
1378
1386
axis ._set_lim (0 , 1 , auto = True )
1379
1387
self ._update_transScale ()
1380
1388
1389
+ if set_right_label_again :
1390
+ self ._axis_map ['y' ].set_label_position ('right' )
1391
+
1381
1392
self .stale = True
1382
1393
1383
1394
def clear (self ):
You can’t perform that action at this time.
0 commit comments