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

15 views (last 30 days)
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)

KSSV
KSSV on 1 Jun 2022
Read about datatip

Sam Chak
Sam Chak on 1 Jun 2022
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

Community Treasure Hunt

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

Start Hunting!