Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

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 Ansicht (letzte 30 Tage)
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

Antworten (2)

Walter Roberson
Walter Roberson am 28 Sep. 2011

Image Analyst
Image Analyst am 28 Sep. 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.

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by