2424import matplotlib .docstring as docstring
2525import matplotlib .scale as mscale
2626from matplotlib .axes import Axes , rcParams
27- from matplotlib .colors import Normalize , LightSource
2827from matplotlib .transforms import Bbox
2928from matplotlib .tri .triangulation import Triangulation
3029
@@ -1650,7 +1649,7 @@ def _shade_colors(self, color, normals, lightsource=None):
16501649 """
16511650 if lightsource is None :
16521651 # chosen for backwards-compatibility
1653- lightsource = LightSource (azdeg = 225 , altdeg = 19.4712 )
1652+ lightsource = mcolors . LightSource (azdeg = 225 , altdeg = 19.4712 )
16541653
16551654 with np .errstate (invalid = "ignore" ):
16561655 shade = ((normals / np .linalg .norm (normals , axis = 1 , keepdims = True ))
@@ -1659,8 +1658,8 @@ def _shade_colors(self, color, normals, lightsource=None):
16591658
16601659 if mask .any ():
16611660 # convert dot product to allowed shading fractions
1662- in_norm = Normalize (- 1 , 1 )
1663- out_norm = Normalize (0.3 , 1 ).inverse
1661+ in_norm = mcolors . Normalize (- 1 , 1 )
1662+ out_norm = mcolors . Normalize (0.3 , 1 ).inverse
16641663
16651664 def norm (x ):
16661665 return out_norm (in_norm (x ))
0 commit comments