@@ -322,10 +322,12 @@ def update_position(self, loc):
322
322
trans = self .tick2line ._marker ._transform
323
323
self .tick2line ._marker ._transform = trans
324
324
325
- if self .label1On :
326
- self .label1 .set_rotation (np .rad2deg (angle ) + self ._labelrotation )
327
- if self .label2On :
328
- self .label2 .set_rotation (np .rad2deg (angle ) + self ._labelrotation )
325
+ if not _is_full_circle_deg (axes .get_thetamin (), axes .get_thetamax ()):
326
+ angle = np .rad2deg (angle ) + self ._labelrotation
327
+ if self .label1On :
328
+ self .label1 .set_rotation (angle )
329
+ if self .label2On :
330
+ self .label2 .set_rotation (angle )
329
331
330
332
self ._update_padding (self ._loc * axes .get_theta_direction () +
331
333
axes .get_theta_offset ())
@@ -479,7 +481,8 @@ class RadialTick(maxis.YTick):
479
481
This subclass of `YTick` provides radial ticks with some small modification
480
482
to their re-positioning such that ticks are rotated based on axes limits.
481
483
This results in ticks that are correctly perpendicular to the spine. Labels
482
- are also rotated to be perpendicular to the spine.
484
+ are also rotated to be perpendicular to the spine, but only for wedges, to
485
+ preserve backwards compatibility.
483
486
"""
484
487
def _get_text1 (self ):
485
488
t = maxis .YTick ._get_text1 (self )
@@ -502,7 +505,7 @@ def update_position(self, loc):
502
505
full = _is_full_circle_deg (thetamin , thetamax )
503
506
504
507
if full :
505
- angle = axes . get_rlabel_position () * direction + offset - 90
508
+ angle = 0
506
509
tick_angle = np .deg2rad (angle )
507
510
else :
508
511
angle = thetamin * direction + offset - 90
@@ -825,10 +828,16 @@ def get_xaxis_transform(self, which='grid'):
825
828
return self ._xaxis_transform
826
829
827
830
def get_xaxis_text1_transform (self , pad ):
828
- return self ._xaxis_text_transform , 'bottom' , 'center'
831
+ if _is_full_circle_rad (* self ._realViewLim .intervalx ):
832
+ return self ._xaxis_text_transform , 'center' , 'center'
833
+ else :
834
+ return self ._xaxis_text_transform , 'bottom' , 'center'
829
835
830
836
def get_xaxis_text2_transform (self , pad ):
831
- return self ._xaxis_text_transform , 'top' , 'center'
837
+ if _is_full_circle_rad (* self ._realViewLim .intervalx ):
838
+ return self ._xaxis_text_transform , 'center' , 'center'
839
+ else :
840
+ return self ._xaxis_text_transform , 'top' , 'center'
832
841
833
842
def get_yaxis_transform (self , which = 'grid' ):
834
843
if which in ('tick1' , 'tick2' ):
@@ -842,8 +851,7 @@ def get_yaxis_transform(self, which='grid'):
842
851
def get_yaxis_text1_transform (self , pad ):
843
852
thetamin , thetamax = self ._realViewLim .intervalx
844
853
if _is_full_circle_rad (thetamin , thetamax ):
845
- halign = 'left'
846
- pad_shift = _ThetaShift (self , pad , 'rlabel' )
854
+ return self ._yaxis_text_transform , 'bottom' , 'left'
847
855
elif self .get_theta_direction () > 0 :
848
856
halign = 'left'
849
857
pad_shift = _ThetaShift (self , pad , 'min' )
0 commit comments