@@ -74,19 +74,21 @@ class PolarAffine(Affine2DBase):
7474 The affine part of the polar projection. Scales the output so
7575 that maximum radius rests on the edge of the axes circle.
7676 """
77- def __init__ (self , limits ):
77+ def __init__ (self , scale_transform , limits ):
7878 """
7979 limits is the view limit of the data. The only part of
8080 its bounds that is used is ymax (for the radius maximum).
8181 """
8282 Affine2DBase .__init__ (self )
83+ self ._scale_transform = scale_transform
8384 self ._limits = limits
84- self .set_children (limits )
85+ self .set_children (scale_transform , limits )
8586 self ._mtx = None
8687
8788 def get_matrix (self ):
8889 if self ._invalid :
89- ymax = self ._limits .ymax
90+ limits_scaled = self ._limits .transformed (self ._scale_transform )
91+ ymax = limits_scaled .ymax
9092 affine = Affine2D () \
9193 .scale (0.5 / ymax ) \
9294 .translate (0.5 , 0.5 )
@@ -193,7 +195,7 @@ def _set_lim_and_transforms(self):
193195
194196 # An affine transformation on the data, generally to limit the
195197 # range of the axes
196- self .transProjectionAffine = self .PolarAffine (self .viewLim )
198+ self .transProjectionAffine = self .PolarAffine (self .transScale , self . viewLim )
197199
198200 # The complete data transformation stack -- from data all the
199201 # way to display coordinates
@@ -205,7 +207,7 @@ def _set_lim_and_transforms(self):
205207 # the edge of the axis circle.
206208 self ._xaxis_transform = (
207209 self .transProjection +
208- self .PolarAffine (Bbox .unit ()) +
210+ self .PolarAffine (IdentityTransform (), Bbox .unit ()) +
209211 self .transAxes )
210212 # The theta labels are moved from radius == 0.0 to radius == 1.1
211213 self ._theta_label1_position = Affine2D ().translate (0.0 , 1.1 )
0 commit comments