是否可以在相同的图形中使用不同的shading类型?
例如,这段代码:
figure; hold on
surf(1:10,1:10,repmat(1,10,10),rand(10))
shading flat; hold on
surf(1:10,1:10,repmat(3,10,10),rand(10))
shading flat; hold on
surf(1:10,1:10,repmat(5,10,10),rand(10))
shading interp
view(-15,32)在以下方面的成果:

这样,最后一个shading就可以确定图中所有对象的interp类型。
这附近有工作吗?
发布于 2017-08-29 08:24:50
默认情况下,当您使用'FaceColor'时,flat是black,'EdgeColor'是black。
shading flat将'FaceColor'设置为'flat','EdgeColor'设置为none。
shading interp将'FaceColor'设置为'interp','EdgeColor'设置为none。
因此,您可以指定以下这些属性:
figure;
surf(1:10,1:10,repmat(1,10,10),rand(10),'EdgeColor','none');
hold on; %You don't need to use hold on again and again
surf(1:10,1:10,repmat(3,10,10),rand(10),'EdgeColor','none');
surf(1:10,1:10,repmat(5,10,10),rand(10),'FaceColor', 'interp','EdgeColor','none');
view(-15,32);这意味着:

或者获取每个曲面图的句柄,并在后面更改,如文档中所示。
https://stackoverflow.com/questions/45933322
复制相似问题