Hi,
I am using the standard matplotlib on Ubuntu 14.04.
I was creating a custom colormap using the standard dict with
rgb values method (something I have done before as well). However,
one of the values in the 'r' array was 55 instead of .55 and contourf
would die saying 'invalid rgb value' which was somewhere near 51.
Ideally, matplotlib should catch this, and I did some digging to see what
is happening. I finally saw this bit of code in 473 in colors.py (in the
function
makMappingArray)
np.clip(lut, 0.0, 1.0)
it appears that np.clip does not modify its arguments and this should
instead
be
lut = np.clip(lut, 0.0, 1.0)
which fixed the problem. Of course, if this error(?) was not there, I would
have
never found the problem in my custom colormap, so not all bad afer all ;)
Thanks,
Joy
--
The best ruler, when he finishes his
tasks and completes his affairs,
the people say
“It all happened naturally”
- Te Tao Ch'ing
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users