Imagesc change of colors

2 views (last 30 days)
Salvatore Turino
Salvatore Turino on 9 Dec 2011
Hello, i have a matrix like this one:
1.0000 0.7944 0.7361 0.8205 0.4192
0.7944 1.0000 0.8663 0.6780 0.3435
0.7361 0.8663 1.0000 0.7351 0.3311
0.8205 0.6780 0.7351 1.0000 0.3555
0.4192 0.3435 0.3311 0.3555 1.0000
that is the result between the correlation of different measures.
Using imagesc i do the plot of this matrix as shown in figure:
using the command caxis i set the colorbar between [-1, 1] and the colors became fuzzy. i want to know if it is possible, and how, to set for example at index a(1,2) the color that i chose and if it is possible to use/set the same color for a different value in another matrix but at the same position (always a(1,2)).
  1 Comment
Sven
Sven on 9 Dec 2011
Salvatore, make sure you read:
Doc > Image Processing Toolbox > Introduction > Indexed Images
Then:
[newIm, colMap] = gray2ind(Im);
Will give you your colour map with a new *indexed* image.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!