@@ -1006,24 +1006,34 @@ def _reset_locator_formatter_scale(self):
10061006 self .locator = None
10071007 self .minorlocator = None
10081008 self .formatter = None
1009- if ((self .spacing == 'uniform' ) and
1010- ((self .boundaries is not None ) or
1011- isinstance (self .norm , colors .BoundaryNorm ))):
1012- funcs = (self ._forward_boundaries , self ._inverse_boundaries )
1013- self .ax .set_xscale ('function' , functions = funcs )
1014- self .ax .set_yscale ('function' , functions = funcs )
1015- self .__scale = 'function'
1016- elif hasattr (self .norm , '_scale' ) and (self .norm ._scale is not None ):
1009+ if (self .boundaries is not None or
1010+ isinstance (self .norm , colors .BoundaryNorm )):
1011+ if self .spacing == 'uniform' :
1012+ funcs = (self ._forward_boundaries , self ._inverse_boundaries )
1013+ self .ax .set_xscale ('function' , functions = funcs )
1014+ self .ax .set_yscale ('function' , functions = funcs )
1015+ self .__scale = 'function'
1016+ elif self .spacing == 'proportional' :
1017+ self .__scale = 'linear'
1018+ self .ax .set_xscale ('linear' )
1019+ self .ax .set_yscale ('linear' )
1020+ elif hasattr (self .norm , '_scale' ) and self .norm ._scale is not None :
1021+ # use the norm's scale:
10171022 self .ax .set_xscale (self .norm ._scale )
10181023 self .ax .set_yscale (self .norm ._scale )
10191024 self .__scale = self .norm ._scale .name
1020- else :
1025+ elif type (self .norm ) is colors .Normalize :
1026+ # plain Normalize:
10211027 self .ax .set_xscale ('linear' )
10221028 self .ax .set_yscale ('linear' )
1023- if type (self .norm ) is colors .Normalize :
1024- self .__scale = 'linear'
1025- else :
1026- self .__scale = 'manual'
1029+ self .__scale = 'linear'
1030+ else :
1031+ # norm._scale is None or not an attr: derive the scale from
1032+ # the Norm:
1033+ funcs = (self .norm , self .norm .inverse )
1034+ self .ax .set_xscale ('function' , functions = funcs )
1035+ self .ax .set_yscale ('function' , functions = funcs )
1036+ self .__scale = 'function'
10271037
10281038 def _locate (self , x ):
10291039 """
0 commit comments