how can I add a point in figure?

조회 수: 6 (최근 30일)
Adnan
Adnan 2025년 4월 8일
댓글: Adnan 2025년 4월 8일
Hi,
I want to add a point to this figure. Can you please tell me how to do that ?
the point that I want to add to my figure is: x=70.00; y= 0.30. Thanks for your time.

채택된 답변

Star Strider
Star Strider 2025년 4월 8일
편집: Star Strider 2025년 4월 8일
Probably the easiest way —
figure
% surf(...)
% view(0,90)
hold on
plot3(70.00, 0.30, 1, 'sr', MarkerFaceColor='r')
hold off
view(0,90)
Ax = gca;
Ax.YScale='log';
You can also vary the MarkerSize and other properties.
Since you are plotting on a surface, it may be necessary to use the scatteredInterpolant function to put the point exactly on the surface, or just use the maximum value for the surface (apparently 1, according to the colorbar scale), as I did here.
EDIT — Added explanatory detail.
.
  댓글 수: 6
Image Analyst
Image Analyst 2025년 4월 8일
@Adnan, there is also drawpoint and a set of other associated functions for other "draw" functions that you may want to check out, though I agree that plot() is certainly the easiest way.
Adnan
Adnan 2025년 4월 8일
Thanks for that @Image Analyst

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Labels and Styling에 대해 자세히 알아보기

태그

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by