MATLAB: How to change this plot to look like the provided image

femMATLABpatchplotsurface

G

Best Answer

T is in the range 300 to 350.
If you change to zlim([300 360]) then you will get a tall narrow tower. The reason for that is that you used axis equal and that applies to to z axis as well
I suggest
TS = rescale(T);
ph= patch('Faces',ei2gi,'Vertices',[x(:),y(:),TS(:)],'FaceColor','interp','FaceVertexCData',T,'EdgeColor','black');
axis equal
colorbar('location','westoutside')
xlabel('X'); ylabel('Y'); title('FEM Solution');
xlim([0,7]); ylim([0,5.5]); zlim([0 1]);
view(3);
rescale needs R2017b or later. If you have an earlier version then
TS = mat2gray(T); %rescales, I swear!