File Exchange

image thumbnail

Figure Digitizer

version 1.0 (14.5 KB) by

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

7 Ratings



No License

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 (

Comments and Ratings (9)


ALD (view profile)

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


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


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

It works really fine on any Windows machine.


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;

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.

c z

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

pornthep rachnavy

Patrick Sibanda

MATLAB Release
MATLAB 7.0.4 (R14SP2)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video