How to make part of a plot in color and part in black and white?
9 views (last 30 days)
Show older comments
Hi, I have two plots and and one is in color (plot 1 - it is plotted in the jet colormap) and one is in black & white (plot 2 - it is plotted in the gray colormap). I am trying to overlay Plot 1 onto Plot 2 such that the pixels of Plot 1 that are above a certain threshold in intensity replace the corresponding pixels in plot 2, and are seen in the jet colormap as they are originally, but the remaining regions of plot 2 (the pixels corresponding to those which are below the threshold in plot 1) are from the original grayscale plot of Plot 2. How would I go about doing this?
I know how to do the composition of a data file that is the plot 1/plot 2 combination, but don't know how to display it so all original plot 1 pixels are in jet colormap and all original plot 2 pixels are in the gray colormap.
If this has already been answered, please just paste the link as an answer; I couldn't find it.
Thank you in advance for trying!
3 Comments
Walter Roberson
on 22 Jul 2019
colormap has no effect on plot() . plot() uses axes ColorOrder and ColorOrderIndex properties to determine which RGB color to use for a line if the plot() call does not include a color specification.
Answers (0)
See Also
Categories
Find more on Colormaps 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!