Borrar filtros
Borrar filtros

Add a marker to surf plot

37 visualizaciones (últimos 30 días)
MINA
MINA el 6 de Sept. de 2017
Comentada: MINA el 6 de Sept. de 2017
Hi,
Can someone please tell me how I can add a marker to a figure which is plotted using surf. This is my code, but it doesn't show the marker. Thanks.
figure; h=surf(X,Y,Z,'FaceLighting','phong');
view([0,90]); colormap(hot); cb=colorbar;
h.EdgeColor='none'; shading('interp');
hold on
plot(32,-32,'rx')

Respuesta aceptada

dpb
dpb el 6 de Sept. de 2017
You've got the surface occluding the z-axis values -- to make the point show try something like
ZMax=max(Z(:));
plot3(x,y,ZMax,'rx')
and joy should ensue...

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by