How to get more color gradient on a surface plot?
12 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have made a surface plot. The color gradient is mostly dark blue. How can I adjust the color gradient to get more colors?
Adjusting the color map in the plot tools does not work.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/149963/image.jpeg)
0 commentaires
Réponse acceptée
Image Analyst
le 9 Mai 2015
You need to manually build a non linear colormap. Attach your data and script so people can show you how.
11 commentaires
Walter Roberson
le 11 Mai 2015
I don't think you did what I asked. I think you did
surf(Xm, Ym, log10(Zm)); set(gca,'ZScale','log');
or else
surf(Xm, Ym, log10(Zm), Zm); set(gca,'ZScale','log');
or else
surf(Xm, Ym, log10(Zm), log10(Zm)); set(gca,'ZScale','log');
but what I asked for was
surf(Xm, Ym, Zm, log10(Zm)); set(gca,'ZScale','log');
You would only get the error you did if you had negative Zm or negative log10(Zm) in the third position in conjunction with log axis.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Introduction to Installation and Licensing 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!