How to make 0 value at center colorbar?
32 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
LEONG SING YEW
le 29 Fév 2020
Commenté : LEONG SING YEW
le 1 Mar 2020
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/274417/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/274418/image.png)
Hi i'm trying to replicate the surf plot on the left, currently my background for the surf plot is orange due to 0 value (look at the surf colorbar).
How can i make the 0 at the center of the colorbar? (similar to the left picture)
2 commentaires
dpb
le 29 Fév 2020
When want somebody to try to fiddle with a figure, it's always best to produce a minimal working example that will give them something to start from. Much more difficult to have to try to create/replicate something from scratch...doable, but most won't bother (like me... :) ).
Réponse acceptée
Image Analyst
le 29 Fév 2020
I don't see a surf() plot. I see two images. Anyway to adjust the colorbar, use colormap() to create the colormap, and caxis() to say what value of your data should be at the top and bottom of the color bar.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Colormaps 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!