Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

is there a way to fix the color axis so that similar data values take up similar color values even if the data range has changed ?

1 visualización (últimos 30 días)
Hi, I have a query regarding subplots and mapping values onto colormap (gray). I have a set of 2D matrices with different minimum and maximum values for each. I would like to subplot these different matrices using imagesc but scale them all with respect to a global maximum and minimum. So if a subplot is noisy it would have colors close to black i.e. 0. This way I can differentiate good data from noisy ones straight away. I have tried using caxis with fixed values corresponding to global max and min but it doesn't seem to do the job. I am wondering if there is a way to fix a color to a particular data value irrespective of the data range. Thanks in advance, Stanley

Respuestas (2)

Walter Roberson
Walter Roberson el 28 de Sept. de 2011

Image Analyst
Image Analyst el 28 de Sept. de 2011
You can use imshow() instead of imagesc and if you do that you can set the scaling upper and lower limits yourself. imagesc determines them from your data so it will be different for all of them. You can use whatever colormap you want - all of them will use that colormap and each color will correspond to a certain value no matter what axes it's in or what the range of data in that axes is.

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by