@@ -417,20 +417,20 @@ def _set_lim_and_transforms(self):
417
417
(self .transProjectionAffine + self .transAxes )
418
418
419
419
# This is the transform for theta-axis ticks. It is
420
- # equivalent to transData, except it always puts r == 1 .0 at
421
- # the edge of the axis circle .
420
+ # equivalent to transData, except it always puts r == 0 .0 and r == 1.0
421
+ # at the edge of the axis circles .
422
422
self ._xaxis_transform = (
423
- self .transPureProjection +
424
- self .PolarAffine (IdentityTransform (), Bbox .unit ()) +
423
+ blended_transform_factory (IdentityTransform (),
424
+ BboxTransformTo (self .viewLim )) +
425
+ self .transProjection +
426
+ self .PolarAffine (IdentityTransform (), self ._offsetViewLim ) +
425
427
self .transAxes )
426
428
# The theta labels are moved from radius == 0.0 to radius == 1.1
427
- self ._theta_label1_position = Affine2D ().translate (0.0 , 1.1 )
428
429
self ._xaxis_text1_transform = (
429
- self . _theta_label1_position +
430
+ Affine2D (). translate ( 0.0 , - 0.1 ) +
430
431
self ._xaxis_transform )
431
- self ._theta_label2_position = Affine2D ().translate (0.0 , 1.0 / 1.1 )
432
432
self ._xaxis_text2_transform = (
433
- self . _theta_label2_position +
433
+ Affine2D (). scale ( 1.0 , 1.1 ) +
434
434
self ._xaxis_transform )
435
435
436
436
# This is the transform for r-axis ticks. It scales the theta
@@ -439,7 +439,9 @@ def _set_lim_and_transforms(self):
439
439
self ._yaxis_transform = (
440
440
blended_transform_factory (BboxTransformTo (self .viewLim ),
441
441
IdentityTransform ()) +
442
- self .transData )
442
+ self .transProjection +
443
+ self .PolarAffine (IdentityTransform (), self ._offsetViewLim ) +
444
+ self .transAxes )
443
445
# The r-axis labels are put at an angle and padded in the r-direction
444
446
self ._r_label_position = ScaledTranslation (
445
447
self ._default_rlabel_position , 0.0 , Affine2D ())
@@ -529,12 +531,17 @@ def _gen_axes_patch(self):
529
531
return Wedge ((0.5 , 0.5 ), 0.5 , 0.0 , 360.0 )
530
532
531
533
def _gen_axes_spines (self ):
532
- return {'polar' : mspines .Spine .arc_spine (self , 'top' ,
533
- (0.5 , 0.5 ), 0.5 , 0.0 , 360.0 ),
534
- 'start' : mspines .Spine .linear_spine (self , 'left' ),
535
- 'end' : mspines .Spine .linear_spine (self , 'right' ),
536
- 'inner' : mspines .Spine .arc_spine (self , 'bottom' ,
537
- (0.5 , 0.5 ), 0.0 , 0.0 , 360.0 )}
534
+ spines = {'polar' : mspines .Spine .arc_spine (self , 'top' ,
535
+ (0.5 , 0.5 ), 0.5 ,
536
+ 0.0 , 360.0 ),
537
+ 'start' : mspines .Spine .linear_spine (self , 'left' ),
538
+ 'end' : mspines .Spine .linear_spine (self , 'right' ),
539
+ 'inner' : mspines .Spine .arc_spine (self , 'bottom' ,
540
+ (0.5 , 0.5 ), 0.0 ,
541
+ 0.0 , 360.0 )}
542
+ spines ['start' ].set_transform (self ._yaxis_transform )
543
+ spines ['end' ].set_transform (self ._yaxis_transform )
544
+ return spines
538
545
539
546
def set_thetamax (self , thetamax ):
540
547
self .viewLim .x1 = np .deg2rad (thetamax )
@@ -707,9 +714,6 @@ def set_thetagrids(self, angles, labels=None, frac=None, fmt=None,
707
714
self .set_xticklabels (labels )
708
715
elif fmt is not None :
709
716
self .xaxis .set_major_formatter (FormatStrFormatter (fmt ))
710
- if frac is not None :
711
- self ._theta_label1_position .clear ().translate (0.0 , frac )
712
- self ._theta_label2_position .clear ().translate (0.0 , 1.0 / frac )
713
717
for t in self .xaxis .get_ticklabels ():
714
718
t .update (kwargs )
715
719
return self .xaxis .get_ticklines (), self .xaxis .get_ticklabels ()
0 commit comments