No BSD License  


4.1 | 7 ratings Rate this file 64 Downloads (last 30 days) File Size: 14.5 KB File ID: #11077

Figure Digitizer



14 May 2006 (Updated )

Digiize a curve in a figure to get the data coordinates.

| Watch this File

File Information

This function digitizes curves in a figure, e.g. an image save form a PDF file, plots and displays the data.

% figure digitizer
% Use: 1. Input image to be digitized, e.g. test.jpg. You can type the
% name of the image in the editable text field, or push "Browse"
% button to browse the file.
% 2. Digitize left x, by pushing "Digi x1," and enter corresponding
% value for x1.
% 3. Similarly for x2, y1, y2.
% 4. Digitize x & y along a curve, press "Return" when done.
% 5. x & y will be plotted and displayed.
% Note: x & y axis can be linear or log
% Tips: How to save a jpg image file from a figure in a PDF file
% 1. open the PDF file using Adobe Reader 7.07 (Free on the WEB)
% 2. select the figure using the Snapshot tool of Adobe Reader
% 3. File -> print
% 4. "Selected graphic" in "print range," "Fit to printer margins"
% for "print scaling."
% 5. select "print to file" ... ...
% I beleive that these codes are also a good example of GUI development
% by Hongxue Cai (

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (9)
07 Jan 2014 ALD

Great Work..Thank you for sharing..:)

07 Oct 2011 KYAW KYAW

Dear Hongxue Cai,

Thank you for your contribution and I would like to know how to use your GUI funciton since I am looking for a way to get the x and y coordinates of edge detected images(*.jpg).

Since I was new in this task and pls advise me. I am looking forward to hearing from you good news soon.

Thanks and best regards

07 Oct 2011 KYAW KYAW  
17 May 2011 Marko Radosavljevic

Here's how a Swiss guy, Dominique Lovy solved this:

It works really fine on any Windows machine.

08 Mar 2011 Shannon

Agree with "ming s", there is an error with log plots. The fix provided works for me if I use a slightly different script (in this example, I calculate d differently than ming s:
c = (log10(handles.y2v) - log10(handles.y1v))/(handles.y2 - handles.y1);
d = log10(handles.y2v) - handles.y2*c;
yy = c*handles.y + d;

15 Feb 2008 ming s

East to use UI. Although I tried it with log graph and it showed a wrong result. I think you need to you something like the following for log input:
c = (log10(handles.y2v) - log10(handles.y1v))/(handles.y2 - handles.y1);
d = log10(handles.y1v) - handles.y1*c;
yy = c*handles.y + d;
yy = 10.^yy;

Anyway, think you for sharing it.

28 Nov 2006 c z

If you can output the final reproduced data as a text file, that will be better.

21 Jul 2006 pornthep rachnavy  
29 May 2006 Patrick Sibanda  

Contact us