How to edit surf graph in MATLAB?
1 次查看(过去 30 天)
显示 更早的评论
Hi. I want plot Matrix to surf 3d graph on left picture, but I plot show on right picture. How to fix or code me for plot graph on left picture?
#Thank you.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/166177/image.jpeg)
6 个评论
dbmn
2017-7-26
If you want to get rid of the minus do:
zlim([-40 0]) % change limits, following walters remark
% now we take care about the minus
zticklabels(num2cell(-zticks)); % This creates new z-labels
Note if you update the zlims, you need to update the labels as well, because labels are just stickers that we put onto the z axis and they do not change when the axis changes.
采纳的回答
dbmn
2017-7-21
This should help you get started. I just added some lines to your code to make it look more like the old one
hdl = surf(B);
shading interp
xlabel('row')
ylabel('column')
% added stuff
colormap(jet) % old colormap
colormap(flipud(colormap)) % invert colormap (following Walters Remark)
hdl.EdgeColor = 'k' % black lines
3 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Colormaps 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!