This question is closed. Reopen it to edit or answer.
assigning a color to the same value when ploting multiple matrices
1 view (last 30 days)
Show older comments
Paramonte on 16 Sep 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
I am using imagesc to plot data sets of 16 matrices sized 256x1000 samples .each (data for one patient) I am using subplot to observe all the bi-dimensional plots at once. The max and min values of each of the matrices never match.
Then we close the program, open it again and run another batch of 16 matrices for other patient and so on..
We want that across all the patients and all the program runs, a particular color always represents the same value in the matrices , say 0.56 for yellow,
We have tried to use the version
where clims (stored in the program) are preset universal color limits assigned to the lower and upper color of the colormap, but this will rescale the colors in between, and we are not abble to achieve an universal correspondence between a value and a particular color. For a patient 0.56 will be redish and for another patient/run it will be yellowish, which is not accepted in our case.
Many thanks in advance!
Mike Garrity on 16 Sep 2015
You probably want the caxis function. This will let you set the top and bottom of the color scaling. If you don't do this, then it will get it from the data in your matrix, as you've seen.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!