How to have colourful contours superimposed on a grayscale (imshow) background?
Ältere Kommentare anzeigen
Hi! I need to create contours (with the ordinary colorbar) superimposed on a grayscale image, which I have plotted using imshow. The contours tend to appear in white. Is there any way to give them colours?
Here is my code:
Brain=load('Raw.mat');
background=mat2gray(Brain(:,:,26));
figure
imshow(background)
hold on
densities=[1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8000];
contour(volume(:,:,26),densities)
hold off
Akzeptierte Antwort
Weitere Antworten (1)
Zohreh Khazraei Manesh
am 13 Mai 2016
Bearbeitet: Zohreh Khazraei Manesh
am 13 Mai 2016
0 Stimmen
1 Kommentar
Chad Greene
am 13 Mai 2016
I'm glad it works for ya!
Kategorien
Mehr zu Red finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
