How to set the xy blocks in SURF plot as squares?

4 次查看(过去 30 天)
Hi all,
I have a set of x,y,z data as follows:
x =
0.1 0.31623 1 3.1623 10
y =
-1 -0.75 -0.5 -0.25 0 0.25 0.5 0.75 1
z =
0.36602 0.1774 0.18262 0.22931 0.23142
0.35639 0.28053 0.26868 0.26152 0.22932
0.41203 0.36037 0.3113 0.26592 0.21948
0.42282 0.36818 0.30538 0.25642 0.20567
0.34572 0.31703 0.28316 0.24251 0.19116
0.28834 0.28187 0.26377 0.2291 0.17855
0.27488 0.26436 0.24923 0.21842 0.16904
0.25749 0.25185 0.23936 0.21088 0.16254
0.24742 0.24423 0.23309 0.20598 0.15839
I plot a surface using this:
K>> surf(x, y, eSurf)
K>> view(2)
Matlab gives me this plot:
we can see that the blocks are rectangular but the entire plot is square, is there a way to make the blocks square but the plot rectangular?
Many thanks!

采纳的回答

Walter Roberson
Walter Roberson 2018-6-2
pcolor(x, y, z)
set(gca, 'XScale', 'log', 'dataaspectratio', [10 1 1])
  3 个评论
Walter Roberson
Walter Roberson 2018-6-2
You can use surf(x,y,z); view(2) instead of pcolor(x,y,z)

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by