@@ -309,10 +309,13 @@ def update_position(self, loc):
309
309
trans = self .tick2line ._marker ._transform
310
310
self .tick2line ._marker ._transform = trans
311
311
312
- if self .label1On :
313
- self .label1 .set_rotation (np .rad2deg (angle ) + self ._labelrotation )
314
- if self .label2On :
315
- self .label2 .set_rotation (np .rad2deg (angle ) + self ._labelrotation )
312
+ thetamin = self .axes .get_thetamin ()
313
+ thetamax = self .axes .get_thetamax ()
314
+ if not _is_full_circle_deg (thetamin , thetamax ):
315
+ if self .label1On :
316
+ self .label1 .set_rotation (np .rad2deg (angle ) + self ._labelrotation )
317
+ if self .label2On :
318
+ self .label2 .set_rotation (np .rad2deg (angle ) + self ._labelrotation )
316
319
317
320
@martist .allow_rasterization
318
321
def draw (self , renderer ):
@@ -468,7 +471,8 @@ class RadialTick(maxis.YTick):
468
471
This subclass of `YTick` provides radial ticks with some small modification
469
472
to their re-positioning such that ticks are rotated based on axes limits.
470
473
This results in ticks that are correctly perpendicular to the spine. Labels
471
- are also rotated to be perpendicular to the spine.
474
+ are also rotated to be perpendicular to the spine, but only for wedges, to
475
+ preserve backwards compatibility.
472
476
"""
473
477
def _get_text1 (self ):
474
478
t = maxis .YTick ._get_text1 (self )
@@ -491,7 +495,7 @@ def update_position(self, loc):
491
495
full = _is_full_circle_deg (thetamin , thetamax )
492
496
493
497
if full :
494
- angle = axes . get_rlabel_position () * direction + offset - 90
498
+ angle = 0
495
499
tick_angle = np .deg2rad (angle )
496
500
else :
497
501
angle = thetamin * direction + offset - 90
@@ -798,10 +802,16 @@ def get_xaxis_transform(self, which='grid'):
798
802
return self ._xaxis_transform
799
803
800
804
def get_xaxis_text1_transform (self , pad ):
801
- return self ._xaxis_text_transform , 'bottom' , 'center'
805
+ if _is_full_circle_rad (* self ._realViewLim .intervalx ):
806
+ return self ._xaxis_text_transform , 'center' , 'center'
807
+ else :
808
+ return self ._xaxis_text_transform , 'bottom' , 'center'
802
809
803
810
def get_xaxis_text2_transform (self , pad ):
804
- return self ._xaxis_text_transform , 'top' , 'center'
811
+ if _is_full_circle_rad (* self ._realViewLim .intervalx ):
812
+ return self ._xaxis_text_transform , 'center' , 'center'
813
+ else :
814
+ return self ._xaxis_text_transform , 'top' , 'center'
805
815
806
816
def get_yaxis_transform (self , which = 'grid' ):
807
817
if which in ('tick1' , 'tick2' ):
@@ -815,8 +825,7 @@ def get_yaxis_transform(self, which='grid'):
815
825
def get_yaxis_text1_transform (self , pad ):
816
826
thetamin , thetamax = self ._realViewLim .intervalx
817
827
if _is_full_circle_rad (thetamin , thetamax ):
818
- halign = 'left'
819
- pad_shift = _ThetaShift (self , pad , 'rlabel' )
828
+ return self ._yaxis_text_transform , 'bottom' , 'left'
820
829
elif self .get_theta_direction () > 0 :
821
830
halign = 'left'
822
831
pad_shift = _ThetaShift (self , pad , 'min' )
0 commit comments