8000 PiecewiseLinearNorm by OceanWolf · Pull Request #5061 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

PiecewiseLinearNorm #5061

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bad indexing when returning a scalar
  • Loading branch information
phobson authored and OceanWolf committed Sep 13, 2015
commit d95db3c7e51f874c6fcfdedad0df5c8eaa8c0168
4 changes: 1 addition & 3 deletions lib/matplotlib/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,11 +1034,9 @@ def __call__(self, value, clip=None):
mask=mask)

x, y = [vmin, vcenter, vmax], [0, 0.5, 1]
# returns a scalar if shape == (1,)
result = np.ma.masked_array(np.interp(value, x, y))

if is_scalar:
result = result[0]

return result

def autoscale_None(self, A):
Expand Down
0