How to make part of a plot in color and part in black and white?

3 次查看(过去 30 天)
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 个评论
Ak K
Ak K 2019-7-22
They are plots of an (X,Y) data matrix, called using the plot() command.
Walter Roberson
Walter Roberson 2019-7-22
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.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Color and Styling 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by