Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4513182

Browse filesBrowse files
committed
Fix #4700: Use overlay by default
1 parent f45e9bc commit 4513182
Copy full SHA for 4513182

File tree

Expand file treeCollapse file tree

5 files changed

+2268
-2262
lines changed
Filter options
Expand file treeCollapse file tree

5 files changed

+2268
-2262
lines changed

‎lib/matplotlib/colors.py

Copy file name to clipboardExpand all lines: lib/matplotlib/colors.py
+10-9Lines 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
Loading

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.