I am getting a colorbar with uniform color. I want there to be variations so the distribution makes sense.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Sattik Basu
am 26 Nov. 2017
Kommentiert: Sattik Basu
am 26 Nov. 2017
The P matrix varies from 1 to 2, however the returned figure shows one square with one uniform color. it would be a great help, if i could have a range of colors in that range(1 to 2) to show the distribution.
imshow(P,'InitialMagnification',2000)
colb = colorbar;
set(colb, 'ylim', [1 2])
Akzeptierte Antwort
Walter Roberson
am 26 Nov. 2017
imshow(P, [], 'InitialMagnification',2000)
4 Kommentare
Walter Roberson
am 26 Nov. 2017
colormap(jet) after the imshow() call.
Or... you could instead
imagesc(P);
colormap(jet);
This will not mess up nearly as many settings as imshow() will.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Display Image finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!