[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Overlaying filled contour plots

Craig Markwardt wrote:

> Pavel is on the right track here I think.  Couldn't you do the following:
> y = on1 * 2 + on2
> contour, y, levels=[0,1,2,3]
> Then adjust your color table to match what you need. ( like, 0=black,
> 1=red, 2=blue, 3=purple).

This was my first idea, but I'm afraid of the interpolation that IDL does

With just two possibilities, all entries are 1's or 0's, and IDL interpolates
the contour boundary as being halfway between the two, which is reasonable.

With four possibilities, the interpolation should cause some troubles. If I
have a 00 point given value 0 (black) next to a 11 point given value 3
(purple), IDL will interpolate a 1 and a 2 between them, so instead of a purple
bounding a black, I'll have a purple bounding a blue bounding a red bounding a
black. This interpolation gives misleading results, and I'd like to avoid it if

I'm also working with postscript output, and have never used TV output, so I
don't know if it's usable in my situation.

Thanks for the help. I'll keep playing, and see what I can come up with.

-- Simon