how to get the co-ordinate values & labels when click on the plotted line

2 次查看(过去 30 天)
i have plotted 3 signals(eg:3 straight lines) on axes(or figure)
how can i get the x,y values & the name of the signal when i click on the particular plotted line
thanks in advance

采纳的回答

Muruganandham Subramanian
For e.g.
try this code:
a=[1 2 3 4];
b=[5 6 7 8];
plot(a,b)
legend('signal1');
After this, goto Tools in plotted graph, Enable Data cursor and then Options --> Enable display cursor in window. You can see the results seperate window

更多回答(1 个)

Muruganandham Subramanian
编辑:Muruganandham Subramanian 2012-12-7
In plotted signal, goto Tools->enable datacursor, for signal name goto insert-> legend
  3 个评论
shaz
shaz 2012-12-10
i am in need of x,y values & also the legend(signal name) in a single box
now only x & y values are visible but how to insert the signal name in to the same box only

请先登录,再进行评论。

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by