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: Superimpose different colormap figures over eachother on same figure
Replies: 1   Last Post: Dec 13, 2012 10:03 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Steven Lord

Posts: 17,945
Registered: 12/7/04
Re: Superimpose different colormap figures over eachother on same figure
Posted: Dec 13, 2012 10:03 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Chris " <cabraham@live.com> wrote in message
> Hello Everyone, I've searched everywhere and can't figure out a solution
> to my problem.
> I have 2 240x240 matrices one called IM which is the original image, and
> the second is a mask called MAP (it is a T2 map of the values from an MRI)
> of different values from 25-50. I want to have the original image IM as a
> grayscale then have the MAP as a colormap(jet) superimposed on top of the
> image keeping everywhere where the MAP has 0's as the greyscaled image has
> given by IM along with the colorscale given on the side of the image.
> This is what I have tried among many other ways but still no luck.
> figure, imagesc(im), colormap('gray');
> hold on;
> imagesc(MAP), colormap(jet);
> Any help would be greatly appreciated

The colormap is a FIGURE property, not an AXES or IMAGE property. You can
have only one colormap per figure. You can _simulate_ multiple colormaps in
the same figure using the techniques described in this document:


Steve Lord
To contact Technical Support use the Contact Us link on

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

[Privacy Policy] [Terms of Use]

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