How to interchange Z and Y axes direction in MATLAB?

12 ビュー (過去 30 日間)
Lynn Zahari
Lynn Zahari 2018 年 10 月 11 日
回答済み: atek 2020 年 12 月 19 日
i have 3D plot in matlab lets say i use example isosurface from matlab help [x,y,z,v] = flow; p = patch(isosurface(x,y,z,v,-3)); isonormals(x,y,z,v,p) set(p,'FaceColor','red','EdgeColor','none'); daspect([1 1 1]) view(3); axis tight camlight lighting gouraud xlabel('x-axis');ylabel('y-axis');zlabel('z-axis'); but the problem is that z axis is in vertical direction, and x & y is horizontal direction. i want to interchange so that x and z is horizontal direction and y is in vertical direction. well i can manipulate data dan axis label, but i prefer to do without manipulate the data. is there anyone knows how to do it? thanks
  3 件のコメント
Adam
Adam 2018 年 10 月 11 日
Why not just rotate the plot to the suitable angle? e.g.
doc view
If you still want the z axis to be the z axis despite being horizontal.
Image Analyst
Image Analyst 2018 年 10 月 11 日
Shouldn't these be answers down below in the official Answers section? They sound like answers to me.

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

回答 (1 件)

atek
atek 2020 年 12 月 19 日
Interchange the order of variables you are plotting, i.e. instead of plotfx(x,y,z) use plotfx(z,x,y)

カテゴリ

Help Center および File ExchangeGraphics Performance についてさらに検索

タグ

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by