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 Exchange에서 MATLAB에 대해 자세히 알아보기

제품

태그

질문:

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