A strange phenomenon for the function surf

Hi,
I was trying to use the surf function to get the surface of 3 dimensional data. Everything goes well if I let the properties of the axes be default. Once I changed the "NextPlot" property of the current axes to "add", then the result image from the surf function became a 2-d image, only the x-y plane. I don't know why this happened. Could anybody know the reason for this? Many thanks.
Xiaowei.

 採用された回答

Mike Garrity
Mike Garrity 2014 年 9 月 24 日

0 投票

The surf command normally does a "view(3)". But when NextPlot is set to add, it doesn't because it thinks you've already got the view set the way you want it. It is trying not to disturb your current view settings.
You can simply do the call to view(3) yourself after calling surf.
view(3)

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeGraphics Performance についてさらに検索

製品

タグ

質問済み:

2014 年 9 月 23 日

回答済み:

2014 年 9 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by