Skip to content

Commit

Permalink
Fix #4700: Use overlay by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Jan 25, 2016
1 parent f45e9bc commit 4513182
Show file tree
Hide file tree
Showing 5 changed files with 2,268 additions and 2,262 deletions.
19 changes: 10 additions & 9 deletions lib/matplotlib/colors.py
Expand Up @@ -1598,7 +1598,7 @@ def hillshade(self, elevation, vert_exag=1, dx=1, dy=1, fraction=1.):

return intensity

def shade(self, data, cmap, norm=None, blend_mode='hsv', vmin=None,
def shade(self, data, cmap, norm=None, blend_mode='overlay', vmin=None,
vmax=None, vert_exag=1, dx=1, dy=1, fraction=1, **kwargs):
"""
Combine colormapped data values with an illumination intensity map
Expand All @@ -1618,15 +1618,16 @@ def shade(self, data, cmap, norm=None, blend_mode='hsv', vmin=None,
The normalization used to scale values before colormapping. If
None, the input will be linearly scaled between its min and max.
blend_mode : {'hsv', 'overlay', 'soft'} or callable, optional
The type of blending used to combine the colormapped data values
with the illumination intensity. For backwards compatibility, this
defaults to "hsv". Note that for most topographic surfaces,
The type of blending used to combine the colormapped data
values with the illumination intensity. Default is
"overlay". Note that for most topographic surfaces,
"overlay" or "soft" appear more visually realistic. If a
user-defined function is supplied, it is expected to combine an
MxNx3 RGB array of floats (ranging 0 to 1) with an MxNx1 hillshade
array (also 0 to 1). (Call signature `func(rgb, illum, **kwargs)`)
Additional kwargs supplied to this function will be passed on to
the *blend_mode* function.
user-defined function is supplied, it is expected to
combine an MxNx3 RGB array of floats (ranging 0 to 1) with
an MxNx1 hillshade array (also 0 to 1). (Call signature
`func(rgb, illum, **kwargs)`) Additional kwargs supplied
to this function will be passed on to the *blend_mode*
function.
vmin : scalar or None, optional
The minimum value used in colormapping *data*. If *None* the
minimum value in *data* is used. If *norm* is specified, then this
Expand Down
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4513182

Please sign in to comment.