Color scales: Black out the middle range.


Hi

I'm making an image plot and, I'm wondering if it's possible to black out only the middle values of the range in a similarly simple way. For example if my scale runs from -10 to 10, I would like to black out a small range of values centered around 0.

Thanks
What do you mean by "black out"? Do you want those pixels to *be* black, or be missing?

If you want them to be black, regardless of the color table, you'll need to create a color index wave from a color table. And you'll need one color index wave per image plot, because Igor uses the color index wave's X scaling to set the color min/max.

If you want to hide the pixels near 0, use a lookup wave with NaN near the middle:
Make/O/N=(20,20) twod= -10 +p
newimage twod
ModifyImage twod ctab= {*,*,CyanMagenta,0}
Make/O/N=41 colorLookup=p/40; colorLookup[19,21]=NaN
ModifyImage twod ctabAutoscale=0,lookup= colorLookup
Colorscale


--Jim Prouty
Software Engineer, WaveMetrics, Inc.
BlackOutMeansMissing.png (2.48 KB)
Thanks for the reply, Jim.

I was hoping for the pixels to "be" black. So I guess I need to make an index wave. If I'm understanding you and the relevant help file, I can copy an existing colour scheme to a wave using ColorTab2Wave. But then do I need to reset the scale of the new wave to match my desired interval using SetScale before it will work?

Thanks again
Yes, that's the way to do it.

More info if you enter this Igor command:

DisplayHelpTopic "Linear Indexed Color"


--Jim Prouty
Software Engineer, WaveMetrics, Inc.