Skip to content

Commit 4513182

Browse files
committed
Fix #4700: Use overlay by default
1 parent f45e9bc commit 4513182

File tree

5 files changed

+2268
-2262
lines changed

5 files changed

+2268
-2262
lines changed

lib/matplotlib/colors.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,7 +1598,7 @@ def hillshade(self, elevation, vert_exag=1, dx=1, dy=1, fraction=1.):
15981598

15991599
return intensity
16001600

1601-
def shade(self, data, cmap, norm=None, blend_mode='hsv', vmin=None,
1601+
def shade(self, data, cmap, norm=None, blend_mode='overlay', vmin=None,
16021602
vmax=None, vert_exag=1, dx=1, dy=1, fraction=1, **kwargs):
16031603
"""
16041604
Combine colormapped data values with an illumination intensity map
@@ -1618,15 +1618,16 @@ def shade(self, data, cmap, norm=None, blend_mode='hsv', vmin=None,
16181618
The normalization used to scale values before colormapping. If
16191619
None, the input will be linearly scaled between its min and max.
16201620
blend_mode : {'hsv', 'overlay', 'soft'} or callable, optional
1621-
The type of blending used to combine the colormapped data values
1622-
with the illumination intensity. For backwards compatibility, this
1623-
defaults to "hsv". Note that for most topographic surfaces,
1621+
The type of blending used to combine the colormapped data
1622+
values with the illumination intensity. Default is
1623+
"overlay". Note that for most topographic surfaces,
16241624
"overlay" or "soft" appear more visually realistic. If a
1625-
user-defined function is supplied, it is expected to combine an
1626-
MxNx3 RGB array of floats (ranging 0 to 1) with an MxNx1 hillshade
1627-
array (also 0 to 1). (Call signature `func(rgb, illum, **kwargs)`)
1628-
Additional kwargs supplied to this function will be passed on to
1629-
the *blend_mode* function.
1625+
user-defined function is supplied, it is expected to
1626+
combine an MxNx3 RGB array of floats (ranging 0 to 1) with
1627+
an MxNx1 hillshade array (also 0 to 1). (Call signature
1628+
`func(rgb, illum, **kwargs)`) Additional kwargs supplied
1629+
to this function will be passed on to the *blend_mode*
1630+
function.
16301631
vmin : scalar or None, optional
16311632
The minimum value used in colormapping *data*. If *None* the
16321633
minimum value in *data* is used. If *norm* is specified, then this

0 commit comments

Comments
 (0)