Add a marker to surf plot

조회 수: 62 (최근 30일)
MINA
MINA 2017년 9월 6일
댓글: MINA 2017년 9월 6일
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')

채택된 답변

dpb
dpb 2017년 9월 6일
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...
  댓글 수: 1
MINA
MINA 2017년 9월 6일
Thanks. It worked.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by