How can I combine two gray colormap images in different colors?
9 views (last 30 days)
Show older comments
Hello all,
I have two gray colormap images that each represent a data density plot (darker regions = higher density).
I would like to be able to color them in different colors (preferably red and green) and then to combine the two images so that I can see where the two density plots overlap (in an intermediate color between red and green).
I've tried imfuse, and it's about what I'm looking for, except that the overlap between the two images isn't clear (it's just darker and not so much a different color).
Thanks in advance,
W
1 Comment
Image Analyst
on 28 Jul 2014
Can you post an example? Mock something up in Photoshop or Gimp if you have to.
Answers (2)
Chad Greene
on 28 Jul 2014
redmap = rgbmap('white','red');
greenmap = rgbmap('white','green');
Plot your red data set by pcolor or surf or whichever means you're using. Depending on how you plot the color data, you may need to use freezeColors before plotting the green data set. When you plot your two data sets, you can adjust transparency of the two data sets by setting the alpha value.
Image Analyst
on 28 Jul 2014
See this page: http://www.mathworks.com/matlabcentral/answers/101346-how-do-i-use-multiple-colormaps-in-a-single-figure
and also see my attached demo.
0 Comments
See Also
Categories
Find more on Blue in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!