Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.



Re: overlaying filled contour plots
Posted:
Nov 23, 2012 6:53 AM


"Zeba" wrote in message <k8lnmg$pnt$1@newscl01ah.mathworks.com>... > I have two filled contour maps. I want to overlap them and see the intersection region in a different color. I tried using > contourf(X,Y,Z1) > colormap winter > hold on > contourf(X,Y,Z2) > colormap autumn > alpha(0.4) > Plz direct me to a link where this problem has been addressed. I tried reading what others have done, but it differs slightly or may be I am not aware of what they already know. > Thanks..
It's not completely clear want you want. Assuming the aim is to show two overlaid plots, where the top one is semitransparent...?
From the help on transparency: "Objects that support transparency are: Image, Patch, Surface."
Your contour plots are none of these. In that case the easiest way would be to create each contour plot and use getframe() to grab the image data, and then use image() to redisplay the plots as images. You can then use "hold on" and the alpha() command as you did above.
Justin



