Extracting data from a graph image using 'ginput'

3 vues (au cours des 30 derniers jours)
Changho LEE
Changho LEE le 30 Juin 2020
Commenté : Changho LEE le 3 Juil 2020
Hello,
I want to extract data using 'ginput' from an attached file.
  1 commentaire
Changho LEE
Changho LEE le 3 Juil 2020
Your answer helped me a lot.
Thank you.

Connectez-vous pour commenter.

Réponse acceptée

Vishal Gaur
Vishal Gaur le 1 Juil 2020
Hi Changho LEE,
Firstly, you have to digitize your graph. You can find many methods on File Exchange - https://www.mathworks.com/matlabcentral/fileexchange/?term=digitize&sort=ratings_desc
Then you can use ginput.
  1 commentaire
Changho LEE
Changho LEE le 1 Juil 2020
Hi Vishal Gaur,
Thanks for the kind answer.
I picked a tool that looks very useful (graph_picker) and tried it myself, but finally I don't know how to extract the data.
If you know how to do it, I would appreciate it.
See attached file for larger image.

Connectez-vous pour commenter.

Plus de réponses (1)

darova
darova le 2 Juil 2020
here is an example
x = rand(100,1); % generate some data
y = rand(100,1);
plot(x,y,'.r')
p = ginput(1);
d = pdist2([x y],p); % find combination of distances
[~,ix] = min(d); % index of closest poont
line(x(ix),y(ix),'linestyle','none','marker','o')
text(x(ix), y(ix),sprintf('%0.1f %0.1f',x(ix), y(ix)))
  1 commentaire
Changho LEE
Changho LEE le 3 Juil 2020
I didn't adopt it, but it helped.
Thank you for your sincere answer.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Data Exploration dans Help Center et File Exchange

Tags

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by