how can i create a circle with a face color changing radially
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Ofek Dvir
le 9 Juil 2020
Commenté : John D'Errico
le 9 Juil 2020
I want to create such circle, in which it is colored with dark red in the center, to blue.
0 commentaires
Réponse acceptée
John D'Errico
le 9 Juil 2020
[x,y] = meshgrid(linspace(-3,3));
z = exp(-x.^2 - y.^2);
H = pcolor(z);
H.LineStyle = 'none';
colormap(jet)
axis equal
Lots of variations on this theme. Be creative.
2 commentaires
John D'Errico
le 9 Juil 2020
pcolor produces a colored surface, at a default height of z==0.
You can add additional information to a figure if you use the hold command, and then issue additional information to the figure.
You can control various aspects of what you see, what is labeled (as you should know) by use of the graphics handles as returned from the various tools used to create what you plotted.
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Polygons 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!