Skip to content

Commit 332b986

Browse files
committed
Fix radial tick anchors on clockwise polar plots.
The anchor needs to be on the opposite side compared to counterclockwise plots.
1 parent c8dd523 commit 332b986

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/projections/polar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ def update_position(self, loc):
557557
ha = 'left'
558558
va = 'bottom'
559559
else:
560-
ha, va = self._determine_anchor(angle, True)
560+
ha, va = self._determine_anchor(angle, direction > 0)
561561
self.label1.set_ha(ha)
562562
self.label1.set_va(va)
563563
self.label1.set_rotation(text_angle)
@@ -601,7 +601,7 @@ def update_position(self, loc):
601601
else:
602602
text_angle = user_angle
603603
if self.label2On:
604-
ha, va = self._determine_anchor(angle, False)
604+
ha, va = self._determine_anchor(angle, direction < 0)
605605
self.label2.set_ha(ha)
606606
self.label2.set_va(va)
607607
self.label2.set_rotation(text_angle)

0 commit comments

Comments
 (0)