display a single (x, y)

3 次查看(过去 30 天)
Rafael Espírito Santo
Hi everyone.
Does anyone knows how to display a single point (x, y), for instance (2.899, -3.677), on a curve plot?
It´s possible to display points on plotting curves using getCursorInf( ) method but I prefer using other approashs.

回答(1 个)

Star Strider
Star Strider 2019-4-11
I would simply do:
figure
plot(curve_x, curve_y, '-b')
hold on
plot(2.899, -3.677, 'r+')
hold off
grid
That would plot the curve with a solid blue line, and the single point with a red plus sign.
  4 个评论
Rafael Espírito Santo
It´s work Star Strider.
Thank you very much indeed.
Star Strider
Star Strider 2019-4-15
My pleasure.
If my Answer helped you solve your problem, please Accept it!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

产品


版本

R2015a

Community Treasure Hunt

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

Start Hunting!

Translated by