surface disappears when zdata is set to 0
8 visualizzazioni (ultimi 30 giorni)
for some reason i want to set the zdata of a surface plot object to zero, keeping its color, and setting view point to [0 0 1] (looking at it from the top).
view([0 0 1]);
however, this way the surface is not visible anymore with the viewpoint set to [0 0 1]. it only appears setting a different viewpoint which is not what i want. why is this?
Kevin Moerman il 29 Ago 2012
This example is probably equivalent to what you want:
[X,Y,Z]=peaks(25); figure; surf(X,Y,zeros(size(Z)),Z) ; view(3); axis vis3d;
Perhaps you loose your plot because of axis tight? That sometimes crops too tightly. Also have a look at using the pcolor and imagesc commands instead.