[Matplotlib-users] PowerNorm runtime warning
Андрей Парамонов
cmr.pent at gmail.com
Thu Jan 11 01:13:36 EST 2018
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>
More information about the Matplotlib-users
mailing list