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