Coding/Python Matlab

Matlab - ginput() get coordinate on the plot by mouse click

smores 2022. 11. 30. 02:46

x = linspace(0,2,20)';             % generate some data
y = sin(x);
plot(x,y,'.-b')
xy = ginput(1)   

 

~~~~~~~~~~~~~~

Python also uses ginput()