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.

 Respuesta aceptada

Mike Garrity
Mike Garrity el 24 de Sept. de 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)

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 23 de Sept. de 2014

Respondida:

el 24 de Sept. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by