How to solve surface plot viewing issue?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have plotted a data of dimension 20*86 using the surface command. You can see the highlighted zone where the x=4 and Y=10. But without this highlighted zone it feels like the region is x=~20 and y=5.
Is there any way to show exactly this plot from its exact location ? (because without highlight it feels it's over x=~20 and y=5).
I would really appreciate your help.
0 commentaires
Réponses (1)
Star Strider
le 27 Sep 2021
Using an axes call could make the axis limits a bit more obvious, and to call attention to a specific point, one option is to draw a straight vertical line to it —
[X,Y,Z] = peaks(20);
F = scatteredInterpolant(X(:),Y(:),Z(:));
Zsel = F(-1, 2)
figure
surf(X,Y,Z, 'FaceAlpha',0.5)
hold on
plot3([1 1]*(-1), [1 1]*2, [min(zlim) Zsel], '-k', 'LineWidth',2)
hold off
grid on
axis('tight')
xlabel('x')
ylabel('y')
view(-120,30)
Adding a text object is also an option.
Experiment to get different results.
.
0 commentaires
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!