Help with choice of contour intervals in surfc
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Brantosaurus
le 10 Oct 2022
Réponse apportée : Star Strider
le 10 Oct 2022
Is it possible to define a non-default contour plot interval in surfc like it is easily achieved in the contour-based range of plots?
For example how might i plot contours over z-intervals [-7:1:8] in the following:
Z = peaks(X,Y);
surfc(X,Y,Z)
colorbar
0 commentaires
Réponse acceptée
Star Strider
le 10 Oct 2022
The second object in surfc is the countour plot, so address it and set the 'LevelList' property —
[X,Y,Z] = peaks(50);
figure
hsc = surfc(X,Y,Z)
colormap(turbo(50))
colorbar
hsc(2).LevelList = -7:8;
.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!