フィルターのクリア

view([0 90]) reset by axis?

5 ビュー (過去 30 日間)
Peter Fraser
Peter Fraser 2017 年 2 月 4 日
コメント済み: Peter Fraser 2017 年 2 月 7 日
I have a 3D plot that I sometimes want to view in 2D. "view([0 90])" works as expected, but a following "axis" command will reset the view direction to the default. If I change the command order it works (a fine workaround). I can follow either "view([1 90])" or "view([-1 90])" with an "axis" command, and it works as expected. What is happening?
[X,Y,Z] = peaks(25);
figure
surf(X,Y,Z);
view([0 90])
axis([-3 3 -3 3 -10 10]);
[az el] = view
gives az = -37.5, el=30

採用された回答

Ankitha Kollegal Arjun
Ankitha Kollegal Arjun 2017 年 2 月 7 日
This is expected behavior. When using the 'surf' command with the 'view' command and axis limits, axes view of the figure tends to depend on the order in which these commands are issued. So, as you suggested, the right way of doing things is to use the view command after the axes limiting is done.
  1 件のコメント
Peter Fraser
Peter Fraser 2017 年 2 月 7 日
Thanks

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by