在下面的片段中,我尝试将trisurf情节带到背景中,因此情节的黑线(x,y,':',' color',& #39; k')不再隐藏。我尝试了uistack(热图,'底部'),但是trisurf情节似乎并不为人所知。愿任何人提供一个提示,如何解决这个问题?谢谢你,祝你有美好的一天! :)
close all;
figure;
hold;
x = [0.1567 0.2334 0.3098 0.3846 0.4138 0.4585 0.5183 0.1605 0.2398 0.3182 0.3952 0.4718 0.5487 0.5789 0.1629 0.2434 0.3236 0.4024 0.4814 0.5595];
x = x.';
y = [78.2114 85.3144 91.3028 95.9450 97.4787 99.4758 101.3201 88.1143 96.4935 103.4136 108.4151 112.5280 115.3430 116.3878 96.3760 105.0047 112.7581 119.3596 124.1293 128.1137];
y = y.';
z = [0.4250 0.5307 0.5916 0.6210 0.6285 0.6276 0.6251 0.4155 0.5185 0.5978 0.6350 0.6510 0.6596 0.6529 0.4024 0.5072 0.5823 0.6274 0.6415 0.6423];
z = z.';
f = @(X,Y) X;
dt = delaunayTriangulation(x,y);
P = dt.Points;
heatmap = trisurf(dt.ConnectivityList, ...
P(:,1), P(:,2), f(P(:,1),P(:,2)), ...
'EdgeColor', 'none', ...
'FaceColor', 'interp', ...
'FaceLighting', 'phong');
for i=1:10:100
x = 0.15:0.01:0.6;
y = i*x+80;
plot(x,y,'--','color','k') % <- these plots should not be hidden by trisurf plot
end
Example for hidden black plot lins with 'FaceAlpha' = 1.0 of trisurf plot
Example for visible black plot lines, because 'FaceAlpha' of trisurf plot was reduced to 0.5.
答案 0 :(得分:2)
据我所知,你可以使用plot3函数代替plot:
plot3(x,y,ones(size(x)),'--','color','k') % <- these plots should not be hidden by trisurf plot