Colormap function is not working (color does not change)
Mostrar comentarios más antiguos
Hello everyone,
Since I updated my Matlab version from 2015a to 2016b, the colormap function does not make any change to my images as they are still shown in their original grey and white color. It was not like this in version 2015a. I would appreciate it if someone could help me. Thanks
5 comentarios
Marc Jakobi
el 25 de Oct. de 2016
The description of your problem is too vague, since not many people will have encountered it. Could you please add more details, maybe some example code that lets us reproduce your issue?
Nguyen Huudat
el 26 de Oct. de 2016
you should use the right expression of colormap function. Ex: colormap([1 1 1]) is black-white color. But it doesn't affect to an image because the image has already brought it's color.
Fardin Azimi
el 26 de Oct. de 2016
Fardin Azimi
el 26 de Oct. de 2016
Fardin Azimi
el 26 de Oct. de 2016
Respuestas (2)
Image Analyst
el 26 de Oct. de 2016
You need to pass the axes handle in explicitly starting with R2016b otherwise it won't change. For example
colormap(handles.axes1, myColorMap);
4 comentarios
Fardin Azimi
el 26 de Oct. de 2016
Image Analyst
el 26 de Oct. de 2016
What is the name ("tag") of the control on your GUI that you are displaying your image in? How are you displaying it? If you want to apply it to the last axes you showed any image in, try this:
colormap(gca, myColorMap);
AK19
el 28 de Jul. de 2017
Doesn't work on 2017a.
Adam
el 28 de Jul. de 2017
It works fine in R2017a
Jan
el 28 de Jul. de 2017
figure(1)
AxesH = axes;
imshow(CT_Scan1{1}, 'Parent', AxesH);
colormap(AxesH, jet);
Note than imshow accepts the argument 'Colormap' directly also.
1 comentario
Mehedi hasan shuvo
el 5 de Ag. de 2017
It works for me in Matlab 2017a
Categorías
Más información sobre Blue en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!