Draw a gradient circle within a circle
조회 수: 2 (최근 30일)
이전 댓글 표시
I want to code a gradient circle within a circle like shown in the diagram. Any help will be appreciated.
댓글 수: 0
채택된 답변
Matt J
2021년 6월 19일
편집: Matt J
2021년 6월 19일
One way might be to use a patch with vertex interpolation, as in this example.
EDIT:
Here's how you might apply that to a circle:
t=linspace(0,360,500); t(end)=[];
x=cosd(t);
y=sind(t);
c=cosd(t);
patch(x,y,c); colormap(gray); axis equal; caxis([-0.7970 ,0.6373])
댓글 수: 15
Matt J
2021년 6월 20일
You're quite welcome, but please Accept-click the answer if you consider the question resolved.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!