Overlaying filled contour plots [message #25956] |
Fri, 27 July 2001 07:57  |
Simon de Vet
Messages: 36 Registered: May 2000
|
Member |
|
|
I have two sets of data for a series of points. One set indicates the
values of a certain parameter, the others are the values of another
parameter.
Is there a way to overlay two filled contour plots? I'd like, for
example, to have one of the values plotted in red, the other in blue,
with purple (or another colour) where they overlap. These contour maps
have two levels each (on and off), so I don't need to worry about shades
of red or shades of blue. I just need conours for four states: both on
(purple), both off (white), one on other off and vice versa (red and
blue).
Any ideas?
-- Simon
|
|
|
Re: Overlaying filled contour plots [message #26035 is a reply to message #25956] |
Wed, 01 August 2001 05:55  |
Martin Schultz
Messages: 515 Registered: August 1997
|
Senior Member |
|
|
Hi Simon,
I once did something like this using the MIN_VALUE keyword. Basically, the
idea is to "blank" out all values from each of the contour data sets that you
don't want to see, by setting them to something (NaN or -9.99e30 or so), then
call contour with /Overplot, min_value=-8.e30
Martin
Simon de Vet <sdevet@is2.dal.ca> writes:
> I have two sets of data for a series of points. One set indicates the
> values of a certain parameter, the others are the values of another
> parameter.
>
> Is there a way to overlay two filled contour plots? I'd like, for
> example, to have one of the values plotted in red, the other in blue,
> with purple (or another colour) where they overlap. These contour maps
> have two levels each (on and off), so I don't need to worry about shades
> of red or shades of blue. I just need conours for four states: both on
> (purple), both off (white), one on other off and vice versa (red and
> blue).
>
> Any ideas?
>
>
> -- Simon
>
--
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
[[ Dr. Martin Schultz Max-Planck-Institut fuer Meteorologie [[
[[ Bundesstr. 55, 20146 Hamburg [[
[[ phone: +49 40 41173-308 [[
[[ fax: +49 40 41173-298 [[
[[ martin.schultz@dkrz.de [[
[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[ [[[[[[[
|
|
|
Re: Overlaying filled contour plots [message #26060 is a reply to message #25956] |
Tue, 31 July 2001 06:37  |
Simon de Vet
Messages: 36 Registered: May 2000
|
Member |
|
|
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
automatically.
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
possible.
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
|
|
|