Skip to content

Commit 81ea556

Browse files
committed
BUG: in Spine.set_position(), preserve most Axis info.
Clearing the axis is excessive; calling axis.reset_ticks() seems to be both necessary and sufficient. Closes #2941
1 parent b50b937 commit 81ea556

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/spines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ def set_position(self, position):
379379
self.set_transform(self.get_spine_transform())
380380

381381
if self.axis is not None:
382-
self.axis.cla()
382+
self.axis.reset_ticks()
383383

384384
def get_position(self):
385385
"""get the spine position"""

0 commit comments

Comments
 (0)