PowerNorm runtime warning

Hello!

When running

import matplotlib.colors as colors
cmap = colors.PowerNorm(vmin = -1, vmax = 1, gamma = 3)
print(cmap(-1))
print(cmap(+0))
print(cmap(+1))

I expectedly get

0.0
0.125
1.0

However PowerNorm.autoscale* have

if self.vmin < 0:
    self.vmin = 0
    warnings.warn("Power-law scaling on negative values is ill-defined,
clamping to 0.")

Why is it so? PowerNorm does work correctly for negative vmin!

Best wishes,
Andrey Paramonov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/matplotlib-users/attachments/20180111/65a882bd/attachment.html>