如何保留在圆之内的网格线。

我想得到一个这样的图,所以画了网格线,以及一个填充的圆,效果如图2我想把圆外的网格线去掉,得到图1的样子,应该如何做
以下是我的代码
[X,Y] =meshgrid(-6.75:1.5:6.75);
z=X*0;
mesh(X,Y,z);
figure()
h1 = mesh(X,Y,z)
%hold on
%viscircles([0,0],6,'color','r')
axis off
hold on
t = 0:0.1:2*pi;
x = 6*sin(t);
y = 6*cos(t);
patch(x,y,'g')
%axis square tight
alpha(0.5)

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!