Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e5abe80

Browse files
efiringtobias47n9e
authored andcommitted
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 7535299 commit e5abe80

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)