How to use different colormaps for different function in mesh plot.
Afficher commentaires plus anciens
Using different colormaps for same axis is not logical but if I want want to somehow do it then what should I do?
x = linspace(-3,3,100); y = linspace(0,3,100);
[X,Y] = meshgrid(x,y);
Rho2 = X.*X + Y.*Y;
Z = exp(-Rho2);
Z1 = sin(sqrt(Rho2));
figure,
mesh(X,Y,Z,'FaceAlpha',1); hold on
mesh(X,Y,Z1,'FaceAlpha',1);
I'm using R2021a and freezColors function is not suporting, it shows error. Perhaps I'm using it wrong. Anybody has any idea how to do it?
Appriciate your help.
1 commentaire
Walter Roberson
le 5 Sep 2024
freezeColors() is a File Exchange contribution; https://www.mathworks.com/matlabcentral/fileexchange/7943-freezecolors-unfreezecolors
You need to install it to use it (possibly use the Add-On Explorer to install it)
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Color and Styling dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

