comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » contour overplotting
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: contour overplotting [message #75645 is a reply to message #75471] Tue, 15 March 2011 05:56 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
abc writes:

> I have read contour Plot chapter from your new book.
> It is very helpful. But still I am not able to over-plot contours of
> the second data set i.e x1,y1,z1 on my first data set i.e x,y,z with
> different colors.
> Actually my main aim is to find the point of intersection of these two
> over plotted contour plots. I tried a lot but I don't know how to do
> that.

Well, I would do it something like this:

data_1 = cgDemoData(2)
x_1 = Scale_Vector(Findgen(41), 5, 20)
y_1 = Scale_Vector(Findgen(41), 5, 20)

data_2 = cgDemoData(3)
x_2 = Scale_Vector(Findgen(41), 0, 12)
y_2 = Scale_Vector(Findgen(41), 0, 12)

cgLoadCt, 4, /Brewer, /Reverse
cgContour, data_1, x_1, y_1, XRange=[0,20], $
YRange=[0,20], /FILL, NLEVELS=12
cgContour, data_1, x_1, y_1, XRange=[0,20], $
YRange=[0,20], /OVERPLOT, NLEVELS=12


cgLoadCt, 9, /Brewer, /Reverse
cgContour, data_2, x_2, y_2, XRange=[0,20], $
YRange=[0,20], /FILL, NLEVELS=12, /OVERPLOT
cgContour, data_2, x_2, y_2, XRange=[0,20], $
YRange=[0,20], /OVERPLOT, NLEVELS=12

END

You can see the result in this figure:

http://www.idlcoyote.com/misc/double_contour.png

Cheers,

David


--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Poisson Noise
Next Topic: Best way to deal with checking array indices are within bounds

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 12:55:50 PDT 2025

Total time taken to generate the page: 0.00203 seconds