Does anyone have an updated version of SentinelMap?

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 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

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

Eric

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

···

On Mon, Oct 13, 2008 at 3:59 PM, Eric Firing <efiring@...202...> wrote:

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