Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: overlaying filled contour plots
Replies: 1   Last Post: Nov 23, 2012 6:53 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Justin Ashmall

Posts: 20
Registered: 8/16/12
Re: overlaying filled contour plots
Posted: Nov 23, 2012 6:53 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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 semi-transparent...?

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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.