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

Re: Overlaying filled contour plots




"Pavel A. Romashkin" <pavel.romashkin@noaa.gov> writes:

> Couldn't you process the two data sets first and then visualize the
> single result, instead of thinking how to combine two different visuals?
> Cheers,
> Pavel
> 
> Simon de Vet wrote:
> > 
> > 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).

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

Or, the other possibility is to render both contour plots, TVRD()
them, and then perform the bit twizzling on the images. :-)

Craig


-- 
--------------------------------------------------------------------------
Craig B. Markwardt, Ph.D.         EMAIL:    craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
--------------------------------------------------------------------------