x=[0 1 1 0 0]; %x坐标
y=[0 0 1 1 0]; %y坐标
stress=[1 2 3 4 1] %应力大小
fill(x,y,stress); %填充
shading interp; %色彩平滑
colorbar; %分布柱图
axis equal; %坐标轴相等
***
原文:https://www.cnblogs.com/fangjing/p/11432765.html