MATLAB Answers

shaz
0

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

thanks in advance

  0 Comments

Tags

Products

No products are associated with this question.

2 Answers

Answer by Muruganandham Subramanian on 10 Dec 2012
 Accepted answer

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

  0 Comments


Answer by Muruganandham Subramanian on 7 Dec 2012
Edited by Muruganandham Subramanian on 7 Dec 2012

In plotted signal, goto Tools->enable datacursor, for signal name goto insert-> legend

  3 Comments

shaz
on 10 Dec 2012

i would like to have x,y values & the name of the signal in a single box

Goto tools -> options->enable display cursor in window

shaz
on 10 Dec 2012

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


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!