Colormap gradient on patch object together with a surface object
Afficher commentaires plus anciens
I use surf and patch in the same plot but the colors on the patch's face changes when I add the surface. How do I get the entire colormap on the patch face?
Example:
[X,Y]=meshgrid(1:100,1:100);
Z=(X.*Y).^2;
surf(X,Y,Z)
patch('faces',[1 2 3 4],'vertices',[0 0 0; 0 100 0; 0 100 10^8; 0 0 10^8],...
'FaceColor','interp','FaceVertexCData',[0 0 10^8 10^8]')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Polygons dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!