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.

 Réponse acceptée

Mike Garrity
Mike Garrity le 24 Sep 2014
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)

Plus de réponses (0)

Catégories

En savoir plus sur MATLAB dans Centre d'aide et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by