how can i see a points(x,y) value from a matlab plot

i have plotted a data like plot(t,x)
Now i want that when i press a cursor on graph, it will show me a value of that coordinate on the graph

Answers (2)

Also try this: datacursormode
x = linspace(-10, 10, 201);
y = x.^2;
plot(x, y, '.')
dcm = datacursormode;
dcm.Enable = 'on';
dcm.DisplayStyle = 'window';

Categories

Find more on Graphics Performance in Help Center and File Exchange

Products

Release

R2021a

Asked:

on 1 Jun 2022

Answered:

on 1 Jun 2022

Community Treasure Hunt

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

Start Hunting!