How can I combine two gray colormap images in different colors?

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

Can you post an example? Mock something up in Photoshop or Gimp if you have to.

댓글을 달려면 로그인하십시오.

답변 (2개)

Chad Greene
Chad Greene 2014년 7월 28일
You could make two color maps with rgbmap like this:
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.

댓글 수: 1

The plots made using rgbmap look really good and are just what I'm looking for.
However, I can't figure out how to view both plots at the same time. The function I'm using is smoothhist2D , and the initial plot seems to disappear whenever I try to plot the second.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Blue에 대해 자세히 알아보기

질문:

2014년 7월 28일

답변:

2014년 7월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by