Skip to content

Commit 9c3623a

Browse files
committed
Used masked val, not values
1 parent 4e440af commit 9c3623a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lib/matplotlib/colors.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,7 +1195,7 @@ def inverse(self, value):
11951195

11961196
if cbook.iterable(value):
11971197
val = ma.asarray(value)
1198-
return ma.power(value, 1. / gamma) * (vmax - vmin) + vmin
1198+
return ma.power(val, 1. / gamma) * (vmax - vmin) + vmin
11991199
else:
12001200
return pow(value, 1. / gamma) * (vmax - vmin) + vmin
12011201

@@ -1550,8 +1550,7 @@ def hillshade(self, elevation, vert_exag=1, dx=1, dy=1, fraction=1.):
15501550
aspect = np.arctan2(-dy, -dx)
15511551
slope = 0.5 * np.pi - np.arctan(np.hypot(dx, dy))
15521552
intensity = (np.sin(alt) * np.sin(slope) +
1553-
np.cos(alt) * np.cos(slope) *
1554-
np.cos(az - aspect))
1553+
np.cos(alt) * np.cos(slope) * np.cos(az - aspect))
15551554

15561555
# Apply contrast stretch
15571556
imin, imax = intensity.min(), intensity.max()

0 commit comments

Comments
 (0)