How to plot graph using ginput?
Show older comments
Hi friends i want to plot a graph between two graphic input, i did it but i want to make it as my input should be visible before plotting.
This is my code..
axis([0 100 0 100]);
hold on
nodes = 2;
PauseTime = 0.05;
[x,y] = ginput(nodes);
plot(x,y,'--ys','LineWidth',2,'MarkerEdgeColor','b','MarkerFaceColor','b', 'MarkerSize',4);
please help me....
Accepted Answer
More Answers (1)
Walter Roberson
on 31 Oct 2017
0 votes
3 Comments
VALARMATHY K
on 1 Nov 2017
Walter Roberson
on 1 Nov 2017
Instead of using ginput() to get the coordinates, you could imline(), which allows the user to place a draggable resizable line -- so they could effectively select points and move the selection around and see the change in the line, without you having to program in the behaviours yourself.
VALARMATHY K
on 6 Nov 2017
Categories
Find more on Data Exploration in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

