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

Skip to content

Commit ffb2767

Browse files
committed
Updated bug fix
Updated where I put the line self.set_offset_position(position) to better fit the description of the bug
1 parent a378128 commit ffb2767

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/axis.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2023,7 +2023,6 @@ def set_label_position(self, position):
20232023
assert position == 'left' or position == 'right'
20242024
self.label.set_rotation_mode('anchor')
20252025
self.label.set_horizontalalignment('center')
2026-
self.set_offset_position(position)
20272026
if position == 'left':
20282027
self.label.set_verticalalignment('bottom')
20292028
else:
@@ -2115,9 +2114,11 @@ def set_ticks_position(self, position):
21152114
if position == 'right':
21162115
self.set_tick_params(which='both', right=True, labelright=True,
21172116
left=False, labelleft=False)
2117+
self.set_offset_position(position)
21182118
elif position == 'left':
21192119
self.set_tick_params(which='both', right=False, labelright=False,
21202120
left=True, labelleft=True)
2121+
self.set_offset_position(position)
21212122
elif position == 'both':
21222123
self.set_tick_params(which='both', right=True,
21232124
left=True)

0 commit comments

Comments
 (0)