I have bogus values I don't want to display in a gridded data set (regions
of non-convergence, for example).  pcolor does exactly what I want with a
masked array, except the X and Y arguments must be integer arrays (as far as
I can tell) and my data X and Y points are not integer arrays.  An
approximation of what is happening goes like:

x = linspace( 0, pi, 100)
y = linspace( -pi/2, pi/2, 30)
ev = custom_func( x, y)
print sum( isnan( ev))
12 (or whatever)

ev_m = ma.mask_where( isnan( ev), ev)
pcolor( x, y, ev_m) <-- this will fail, with an error like "need more than
one value to unpack" which I think is caused by the non-integer nature of x,
y.


Any suggestions for how can I can address this?  My preference is to use
pcolor, because of the  transparency.  I am not a fan of the scipy
discussion regarding user-driven normalization "sentinels" to catch the
bogus values.  Masked arrays seem so much more flexible.

-Park
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to