フィルターのクリア

Surface plot plotting in a square X and Y axis, need it to be rectangular

4 ビュー (過去 30 日間)
Kyle Watkins
Kyle Watkins 2023 年 11 月 30 日
コメント済み: Dyuman Joshi 2023 年 11 月 30 日
I have a surface plot that is currently plotting with the X and Y axis equal dimensions too each other but I need one axis to be longer than the other for viewing purposes. The data is from a scan and the object that was scanned is not a square, which is why I'm looking to change it to rectangular in shape.
openfig('3D RunOut.fig', 'visible');

採用された回答

Dyuman Joshi
Dyuman Joshi 2023 年 11 月 30 日
You can change the aspect ratio of the plotting box -
%Ratio chosen for example - x/y/z = 1/0.5/0.75
figure
surf(peaks)
ax=gca;
%Method 1
ax.PlotBoxAspectRatio = [1 0.5 0.75];
figure
surf(peaks)
ax=gca;
%Method 2
pbaspect([1 0.5 0.75])
  2 件のコメント
Kyle Watkins
Kyle Watkins 2023 年 11 月 30 日
Perfect, Thank you! The first method worked great. Appreciate the timely response.
Dyuman Joshi
Dyuman Joshi 2023 年 11 月 30 日
You're welcome!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by