Grab 2D points
Updated 21 Aug 2008
% This code is used to digitize figures that you find in publications, journals, or simply scanned reports or documents by clicking on the desired points using the mouse.
% You can use it to pick [x,y] points by clicking on the original scanned plot.
% To run, simply type:
% and then follow the instructions
% 1- Plots or figures should be of jpg, png, bmp or any other format that is
% acceptable by matlab and in the same directory as these m-files you are using.
% 2- You don't have to select the points in increasing or decreasing
% order. Click wherever you want on the plot. I have written a small code
% to sort the vectors in ascending order
% 3- The [x,y] data points will be saved in GRABBED.mat. Load
% GRABBED.mat and the first column of GRABBED will be your absisca points, the second
% are the ordinates.
% This code is written by
% Nassim Khaled
% June 2007
Important:Change imshow to imagesc for people without Image Processing Toolbox.
Nassim Khaled (2023). Grab 2D points (https://www.mathworks.com/matlabcentral/fileexchange/15966-grab-2d-points), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
I have deleted unnecessary data from the output file.