Hi
I'm trying to do color grading based on x axis valeus
here is the script I'm trying to type
%% scattering sst against wind speed
h(1) = figure;
x = reshape(mean_MAx_SST,[],1);
y = reshape(mean_MAx_W,[],1);
z = reshape(Alat,[],1);
m = 20; %size
szv = repmat(m,length(x),1);
CV = jet (length(x));
scatter3 (x,y,z,szv,CV,'filled');
grid on
hold on
colormap (jet)
xlabel ('Mean SSTmax')
ylabel ('Wind speed m/s')
zlabel ('Lattitudes')
colorbar('Direction','reverse')
title (colorbar,'SST Degrees C')
xmin = min(x(:));
xmax = max(x(:));
caxis([xmin,xmax]);
xticks(29:0.1:31.5)
%%%%%%%%%%%%%%%%%%
The result is illogic fro me
I don't know what was my mistake

 Respuesta aceptada

Star Strider
Star Strider el 22 de Jul. de 2019

0 votos

See if adding this line just after your scatter3 call does what you want:
view(-37, 30)

4 comentarios

Jaafar Juneidi
Jaafar Juneidi el 22 de Jul. de 2019
Thanks
But nothing has been changed!
What I want is to illustrate the color as the less x valeu the blueish color, (the reddish for the higher x)!
Star Strider
Star Strider el 22 de Jul. de 2019
As always, my pleasure.
I was not certain what the problem was, so I though it was that you were not seeing your scatter3 plot as 3D.
To colour the markers as the value of the ‘x’ coordinate, replace ‘CV’ with ‘x’ in the scatter3 call:
scatter3 (x,y,z,szv,x,'filled');
That coloured the markers as the ‘x’ value when I tried it in my test code.
Jaafar Juneidi
Jaafar Juneidi el 22 de Jul. de 2019
That's it :)
Thanks a lot
I do appreciat it
Thank you
Star Strider
Star Strider el 22 de Jul. de 2019
As always, my pleasure!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Centro de ayuda y File Exchange.

Productos

Versión

R2017b

Etiquetas

Preguntada:

el 22 de Jul. de 2019

Comentada:

el 22 de Jul. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by