Changing colormap of individual subplot

6 visualizaciones (últimos 30 días)
Desmond Johnson
Desmond Johnson el 1 de Mzo. de 2015
Editada: per isakson el 1 de Mzo. de 2015
Hello I am trying to learn how to change the colormap of a individual subplot. I have looked online and tried apply other peoples method to change my colormap but they all continue to be the same color. I am very new to MATLAB so I apologize in advance for any mistakes I make. I am running MATLAB 2014a on Mac OS X.
x=randn(1,10000);
a=sort(x);
y=x;
b=sort(y);
[X,Y]=meshgrid(a,b);
z=(1000/sqrt(2*pi).*exp(-(X.^2/2)-(Y.^2/2)));
subplot(2,2,1)
surf(X,Y,z);
shading interp
axis tight
colormap cool
Thank you in advance for any help.

Respuesta aceptada

per isakson
per isakson el 1 de Mzo. de 2015
Editada: per isakson el 1 de Mzo. de 2015
That used to be one of Matlabs weak spots. R2014b changed that.
There are several tools in the File Exchange, which mimics multiple colormaps. See

Más respuestas (0)

Categorías

Más información sobre Color and Styling en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by