On Mon, Oct 13, 2008 at 3:59 PM, Eric Firing <[EMAIL PROTECTED]> wrote: > Michael Lerner wrote: >> >> Hi, >> >> I'm trying to plot some data where certain values are marked by a >> sentinel, as per the Cookbook example: >> >> >> http://www.scipy.org/Cookbook/Matplotlib/Plotting_Images_with_Special_Values >> >> However, that code is fairly old, and doesn't work. A version that >> worked as of ~18 months ago was posted to the list: >> >> http://www.nabble.com/Re:-Trying-p8831162.html >> >> but it fails when I try to use it with matplotlib 0.98.3 and imshow. >> Does anyone have an updated version? >> >> Thanks, >> >> -michael >> > > Michael, > > In the mpl "examples" directory there is a script that might be directly > relevant: > > examples/pylab_examples/image_masked.py
That's fantastic. I had tried using masked arrays before. They weren't good enough because I need three different sentinels, and at least one with a controllable alpha value. The combination of set_over, set_under and set_bad gives me exactly what I need. Thanks! -michael > > Eric > -- Michael Lerner, Ph.D. IRTA Postdoctoral Fellow Laboratory of Computational Biology NIH/NHLBI 5635 Fishers Lane, Room T909, MSC 9314 Rockville, MD 20852 (UPS/FedEx/Reality) Bethesda MD 20892-9314 (USPS) http://www.umich.edu/~mlerner ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users