Hi, I'm unsuccessfully trying to flip a scatter3 plot so that the XY plane is on top and Z axis goes downward. Below a rough drawing of what I get vs what I want
setting ZDir property to "reverse" doesn't do the job as the Z axis flips direction, but the X and Y axis remain on the bottom

Réponses (1)

I am not quite certain what you want.
Perhaps this —
xyz = rand(50,3)
xyz = 50×3
0.7188 0.5891 0.9015 0.1405 0.1323 0.5674 0.8789 0.4195 0.3218 0.3677 0.3107 0.4016 0.4559 0.6679 0.4002 0.0467 0.2491 0.0453 0.4620 0.8904 0.7014 0.7939 0.9364 0.3843 0.5425 0.9053 0.0945 0.7427 0.2834 0.0700
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
figure
scatter3(xyz(:,1),xyz(:,2),xyz(:,3),25,xyz(:,3), 'filled')
grid on
xlabel('X')
ylabel('Y')
zlabel('Z')
colormap(turbo)
colorbar
●
figure
scatter3(xyz(:,1),xyz(:,2),xyz(:,3),25,xyz(:,3), 'filled')
grid on
xlabel('X')
ylabel('Y')
zlabel('Z')
colormap(turbo)
colorbar
Ax = gca;
Ax.CameraUpVector = [0 0 -1];
See the Axes Properties View documentation section for more options.
.

Catégories

En savoir plus sur Data Distribution Plots dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by