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

Illustration
Gracesmith9 - 2020-09-11T14:02:49+00:00
Question: how to get the co-ordinate values & labels when click on the plotted line?

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

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

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


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!