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

2 visualizaciones (últimos 30 días)
Ak K
Ak K el 22 de Jul. de 2019
Comentada: Walter Roberson el 22 de Jul. de 2019
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 comentarios
Ak K
Ak K el 22 de Jul. de 2019
They are plots of an (X,Y) data matrix, called using the plot() command.
Walter Roberson
Walter Roberson el 22 de Jul. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Color and Styling en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by