MATLAB Answers

how can i create a circle with a face color changing radially

22 ビュー (過去 30 日間)
Ofek Dvir
Ofek Dvir 2020 年 7 月 9 日 15:43
コメント済み: John D'Errico 2020 年 7 月 9 日 18:29
I want to create such circle, in which it is colored with dark red in the center, to blue.

  0 件のコメント

Sign in to comment.

採用された回答

John D'Errico
John D'Errico 2020 年 7 月 9 日 16:25
[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 件のコメント

Ofek Dvir
Ofek Dvir 2020 年 7 月 9 日 18:04
Thats the scene I want to place this 'heat map' in- on that floor.
How can I add your code to mine so it won't take over the figure?
John D'Errico
John D'Errico 2020 年 7 月 9 日 18:29
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.

Sign in to comment.

その他の回答 (0 件)

タグ


Translated by