View License

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

» Watch video

Highlights from

4.7 | 116 ratings Rate this file 662 Downloads (last 30 days) File Size: 23.4 KB File ID: #7173 Version:
image thumbnail



Jiro Doke (view profile)


17 Mar 2005 (Updated )

Extract (pick out) data points off image files.

| Watch this File

File Information

GRABIT Extracts data points from an image file.
GRABIT starts a GUI program for extracting data from an image file. It is capable of reading in BMP, JPG, TIF, GIF, and PNG files (anything that is readable by IMREAD). Multiple data sets can be extracted from a single image file, and the data is saved as an n-by-2 matrix variable in the workspace. It can also be renamed and saved as a MAT file.

Following steps should be taken:
   1. Load the image file.
   2. Calibrate axes dimensions. You will be prompted to select 4 points on the image.
   3. Grab points by clicking on points. Right-click to delete a point. Image can be zoomed during this stage.
   4. Multiple data sets will remain in memory so long as the GUI is open. Variables can be renamed, saved to file, or edited in Array Editor.

Panning is achieved by clicking and dragging on the image. In addition to using the zoom button, there are keyboard shortcuts for zooming:
 <shift> - center view
 <a> - zoom in
 <b> - zoom out
 <space> - reset view

This code will also work for extracting data points from a tilted or a skewed image (even upside-down or mirrored). The calibration stage ensures that the imperfect orientation or quality of the image is accounted for.

The types of files that will most likely work are BMP, JPG, TIF, GIF (up to 8-bit), and PNG files. Basically, any format supported by the IMREAD is accepted.

GRABIT(FILENAME) will start the GUI program and open the image file FILENAME.
Type GRABIT('-sample') to load a sample image.

Created in MATLAB® R13. Tested up to R2006a


This file inspired Smi Prom and Interactivemouse.

MATLAB release MATLAB 6.5 (R13)
Other requirements Tested up to R2006b
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (129)
21 Feb 2017 Haibin Pan

It's great.Thanks the author.

13 Feb 2017 Muzaffer Ozsecen

10 Feb 2017 Paolo Di Re

When I grab a point, the function draws a red dot on the image.
Is there a way to change the color of the dot from red to another color, for instance cyan, even by modifing the function? Thanks

03 Feb 2017 Raghavendra Arunachala

Great tool.
How to extract the data points if the one of the axis is in logscale? For e.g. yaxis in log scale.

01 Feb 2017 xingya chen


24 Jan 2017 Kurt Duclos

Great GUI. If you could set it for a semilogy, semilogx, or loglog instead of linear only, that would be incredible. Also, the cursor accuracy when grabbing data points be improved by making it more like the cursor when selecting the X, Y axes.

19 Jan 2017 Dale Smith

15 Jan 2017 shiwen wang

Thank U so much!

Comment only
09 Jan 2017 NAGA VBN

29 Dec 2016 MG

MG (view profile)

I like the interface and resolution allowed by the algorithm. However, when I tried using on a plot, it consistently is not correctly scaling my "grabbed" points to neither the min-max x or y coordinates that I input.

Comment only
25 Dec 2016 Beichuan Hong

Thx for this file!

02 Dec 2016 Caroline Loss

excellent tool!
thank you so much!

13 Nov 2016 MM

MM (view profile)

08 Nov 2016 Joeylee


08 Nov 2016 Joeylee

03 Nov 2016 Nabin Paudel

Error message, unable to expand "" into downloads. Any solutions for this issue yet ?

Comment only
23 Oct 2016 vkehayas

28 Sep 2016 Rosemary Le

There is an error message when attempting to unzip the file:

"Unable to expand "" into "Downloads".
(Error 1 - Operation not permitted.)"

Just wanted to notify --

Comment only
26 Sep 2016 HenryatNU

It seems quite useful, but on OSX 10.11.6, Version R2016a, it warns me of 2 deprecated properties which "may go away in future releases." (DrawMode and EraseMode) So it looks like it needs an update. If I can I may try to update this as it might be a good chance for learning some new things for me.
I found that it's a little tricky to set up the axes as the cursor is quite fine, but that is an advantage really. One needs to be careful and practice a bit. Also Log plots need you to choose the exponent so again a tad tricky but practice should help. Not obvious how else you could do it. And "max" really does mena the maximum value on the scale.

Comment only
24 Sep 2016 Prabhat Chandra

22 Sep 2016 Srikanth Divi

16 Sep 2016 rahul verma

How we can save the image, after garbing points.
is there any way to get the selected image.

07 Sep 2016 Chenguang Zhang

great tool!

05 Sep 2016 Yonatan Calahorra

Thank you for this!

02 Sep 2016 GE

GE (view profile)

29 Aug 2016 Shabareesh Kumar

this is a very use full application,
Thank you

18 Aug 2016 Tai Yunxin

18 Aug 2016 Qiyan Lian

It is really a amazing GUI,but there is a warning, EraserMode will not be it should be updated.

18 Aug 2016 Qiyan Lian

16 Aug 2016 Aditya

Aditya (view profile)

Really easy and straightforward to use. No unnecessary complications or extra features. Works great!

16 Aug 2016 Gabriel

21 Jul 2016 Benjamin Cheong

13 Jul 2016 Mohammad Mohammadi

09 Jul 2016 Zac Milne

I use this all of the time for analyzing data from others' work. I wish there was a function to deal with log axes.

08 Jun 2016 Paul Martin

Just what the doctor ordered, worked well first time. Thank you Jiro!


03 Jun 2016 Deepan J

24 May 2016 Euler Oliveira

It worked well and helped me a lot. Thanks!

10 May 2016 Jake G

Jake G (view profile)

Great software, it was a little dated so I needed to tweak it a bit to deal with log scale axis and get rid of those annoying warnings.

04 May 2016 Erik

Erik (view profile)

24 Apr 2016 Hoang Anh Nguyen


16 Apr 2016 Robert Richardson

Very useful software! Very intuitive and easy to use. Exactly what I needed.

05 Apr 2016 Zhang Wenqiang

very good software, so much thanks!

01 Apr 2016 Emon

Emon (view profile)

Excellent. Thanks a lot.

31 Mar 2016 Joris Meurs

Great work! Very useful

31 Mar 2016 Mustafa

Very useful code. This is what I was looking for. Thanks

29 Feb 2016 Ivan

Ivan (view profile)

25 Feb 2016 Andrew Stamps

This has been a great utility for me over the years. However, it appears to be showing its age with the new graphics system. I am now seeing the following warnings when starting the tool:

Warning: The DrawMode property will be removed in a future release. Use the SortMethod property instead.
> In grabit (line 471)
Warning: The EraseMode property is no longer supported and will error in a future release. Use the ANIMATEDLINE function for animating lines
and points instead of EraseMode 'none'. Removing instances of EraseMode set to 'normal', 'xor', and 'background' has minimal impact.

16 Feb 2016 gdowdy

gdowdy (view profile)

Exactly what I needed. The only thing that was not intuitive to me was hitting [ENTER] to indicate that I was done specifying each axis.

04 Feb 2016 mohit raghuwanshi


02 Feb 2016 Use

Use (view profile)

19 Jan 2016 aaron pung

Straight-forward, simple, and gave me everything I was looking for, and much more.
- Upload image file
- Choose/define X,Y axes
- Zoom/Pan to area of interest
- Click to record desired datapoints
- Plot is generated in real-time
- Data table can be saved for further processing!

19 Jan 2016 Erik Reinertsen

Worked well for simple data point extraction from a PNG.

For those of you getting the error "unexpected matlab operator", make sure you call "addpath" and add the directory in which this .m file is stored. The main function calls other functions within the .m file.

24 Dec 2015 Dimani4

Dimani4 (view profile)

amazing program!!!! thank you very much!!!!

16 Dec 2015 KSSV

KSSV (view profile)

10 Dec 2015 keivan80

Thank you so much . It was so usefull

24 Nov 2015 Alejandra Matamoros

26 Aug 2015 Rahul

Rahul (view profile)

Super! This just saved me quite a bit of work. Thank you.

06 Jul 2015 Xin

Xin (view profile)

12 Jun 2015 Yuan Feng

28 May 2015 Gabriel Chatterjee

excellent work a nice tool

28 May 2015 Edgar

Edgar (view profile)

I wonder if there is a way to automatically recognize the waves if the image has a wave of a unique color and if there is a way to do multiple files instead of clicking points one by one. Thanks!

11 May 2015 Matthias Eberlein

Does make my life easier, thank you

07 May 2015 Faezeh F

That's great. Thank you very much!

05 May 2015 daniel

daniel (view profile)

WOW!! Absolutely beautiful, I love it, thanks!!!!


13 Apr 2015 Punit

Punit (view profile)

For people asking about logarithmic axis...
You can put the values for calibration of log axis as 1, 2, 3 instead of 10, 100, 1000, and then when you plot the data just take 10^(axisValues).

24 Mar 2015 Konstantin

Best, Thanks

18 Feb 2015 Nikolay

11 Jan 2015 Bikash

Bikash (view profile)

It is working fine. Nice work.

18 Dec 2014 Ole

Ole (view profile)

How does it work with log axis ?
Thank you.

Comment only
02 Dec 2014 Nikhil

Nikhil (view profile)

21 Oct 2014 Nitin

Nitin (view profile)

31 Aug 2014 Abhishek Anchal

Nice work Jiro. Liked it. Very useful for me.

03 Apr 2014 Amit

Amit (view profile)

05 Mar 2014 Keith Lindsay

17 Dec 2013 Andrew Stamps

This has been a very useful submission for me. One minor improvement that I could suggest is an option to recalibrate the x-axis and y-axis independently. I think that would be great for plots with multiple y axes.

05 Dec 2013 Yukyung

Won't work in 2013b though

27 Jul 2013 Roberto Herrera

18 Jun 2013 Yuji Zhang

Works so well! Thank you for your contribution Jiro~

Suggestion: automatic recognize curve (if possible)

17 Mar 2013 Adrian Lara-Quintanilla

10 Mar 2013 arnold

arnold (view profile)

thanks Jiro, great tool. If you find the time, why don't you go and put in a way to select a continuous color (a line) for instance. This would make clicking along a closed plot unecessary. What do you think ;)

06 Feb 2013 Danny Sale

Worked perfectly for me. This is one of the best implementations of a plot digitizer I have ever used. Thanks for sharing your excellent work!

09 Jul 2012 Francesco

Great tool!
Does exit an updated version to deal with logarithmic axes?
Or maybe some one could give me some clue to implement it in the code... thanks

23 Feb 2012 Zhen Chen

14 Feb 2012 Luke

Luke (view profile)

22 Dec 2011 Ahmed Ali

Many thanks for you, you have solved a very complex problem for me

12 Jul 2011 James Herman

01 Jul 2011 mike

mike (view profile)

Thanks for the great tool. I'm currently trying to adapt it a little bit for my use, and bit of help would be appreciated.

I have a bunch of images from which I plan to grab data. However, they only have y axis reference points, so I can't calibrate them properly. The x-axis is on the same scale as the y-axis, so what I want to do is force the origins of both axes to be at the same location. Then I can force the horizontal distance (on screen) between Xo and Xmax to be the same as the vertical distance between Yo and Ymax. However, I don't really understand how the locations of the calibration points are stored and used, so I'm having trouble.

11 May 2011 Oscar

Oscar (view profile)

It is very helpful, veru well done

Comment only
25 Mar 2011 quadro1327

very nice tool!

17 Feb 2011 Thomas

Thomas (view profile)

06 Dec 2010 Nassim Khaled

Nassim Khaled (view profile)

10 Nov 2010 Whitney

There are several versions of this type of GUI on the exchange, but this is by far the best one. It incorporates all of the stuff that the other guys are missing, plus the interface is very easy to use. I especially like that it can handle skewed images from really old scanned papers.

11 Oct 2010 Matthew


03 Jun 2010 Enrico

Enrico (view profile)

Nice Gui, but miss an automatic curve recognition. I'm also using reverseplot
(, which has this feature, but a slightly inferior gui.

12 Jan 2010 Ram Lakshmi


Thanks for this nice tool.
Instead of point, can I get an area by marking a particular region in the bit map.

Comment only
17 Sep 2009 Torsten Vogel

Torsten Vogel (view profile)

02 Mar 2009 Donat-Pierre Luigi

This a great application. I would have one request. Would it be possible to calibrate to the image size, with origin at top left max Y at bottom-left and max X at top-right. It is very basic and not as general as the current calibration procedure using 4points.
I am having issues with zoom and ginput to get the coordinate of a point in an image to change the coordinate system to that point later on in pixel and physical units. Thanks.

23 Feb 2009 Brian

Brian (view profile)

A very useful application.

26 May 2008 a c


04 Apr 2008 ghgf ghf

26 Mar 2008 Sigmund As

Excellent tool - best one of these I've used so far. Log axes? No problem, just type in the exponent as the calibration values.

* Ask the user if the data should be adjusted if the user recalibrates after grabbing.
* If the scan is not perfectly horizontal it would be nice to have two adjustment points for each xmin, xmax, ymin, and ymax - i.e. support for rotated coordinate transformation.

23 Dec 2007 Mikkel Pedersen

Super tool!

Need the capability to use log-axes though.

30 Oct 2007 Lorenzo Luini

This is one of the best and most useful tool I found here: really compliments!

19 Oct 2007 Jhon Gonzalez


Is it possible that in the preview box shows the position calibrated and the corresponding pixel?

I plan to use it to calibrate a video to follow a laser spot

16 Oct 2007 Iomsn Egenson

This program is ingenious. It is extremely small, easy to use and yet so useful that it makes it the ultimate grab tool.

11 Oct 2007 Amandine Cagnioncle

This script is a lot better than Datathief which I formerly used. It makes extracting data from figures easier and faster!

06 Sep 2007 Avi Pal

Does not work. from the first line itself it says unexpected matlab operator..
please help. i think its not identifying 3d
i am using matlab (R14)

Comment only
06 Sep 2007 Avi Pal

Does not work. from the first line itself it says unexpected matlab operator..
please help.
i am using matlab (R14)

Comment only

for the last six month i am trying to extract the data from the image file. Now i got it. this is very well work for me and all (those who are working Scientific data processing).

21 Feb 2007 Jean-Luc Dellis

Thanks a lot. Good Job.

09 Feb 2007 Eduard van der Zwan

This is something I was looking for. Thank You. Tip: wouldn't it be nice to extract data point form graphs with logaritmic axes?

07 Feb 2007 Pankaj Porwal

Just loved it. Very good interface also.

12 Jan 2007 Hector Mancha

Very usefull,

18 Nov 2006 Cong Le

10 Nov 2006 Lars Sundstrom

Extremely useful. Thank you very much for sharing.

03 Aug 2006 Nick Peters

Excellent tool. Thanks for posting.

02 May 2006 Seis Errs

very useful tool. Thanks a lot.

30 Mar 2006 John Terry

excellence! I am waiting for the next version which can deal with logarithmic axis. Good luck!

30 Mar 2006 iman satria

02 Mar 2006 Jiro Doke

I have uploaded an improved version. It has a better zooming feature (also zoomable during calibration) and a click-n-drag panning feature. I have not yet implemented capability to deal with LOGARITHMIC axes, but that's on my to-do list.

Comment only
27 Feb 2006 Dick Beresford

A very useful utility. Suggested additions and improvements are:
1) facility to deal with logarithmic as well as linear axes.
2) allow zoom function to work in calibration mode as well as in data grabbing mode so that axis limits can be defined more accurately.

13 Feb 2006 Leo Medo

Sorry, but wenn I start your code, I can see only GUI. If I browse a filename (Load Image) - only a path and image name will be shown, but I can´t see anything... Please inform me what to do, thanks

Comment only
23 Dec 2005 Jiro Doke

Thanks for the comment. I think the problem might be that you don't have Image Processing Toolbox. But nice suggestions, I'll update it with IMAGE command to be more compatible. It should be up in the next update. In the meantime, you can download the newest version from here:

Comment only
22 Dec 2005 Tony Jones

The imshow command used at line 382 ('iH = imshow(A, map)') does not work in MATLAB R14 SP2. Replacing it with 'iH = image(A);
colormap(map);' solves the problem. Other than that a very useful but of code!

18 Aug 2005 Dewa Arsa

A very good code. I have tried it, it works well.

02 Aug 2005 Siva Venkat

good piece of code. useful for retrieving data points from images.

02 Jun 2005 radha proddaturi

perfect... would suggest to improve on finding data automatically when clicked on any particular line on the image

11 May 2005 Chen-Fen Huang

21 Mar 2005

Added the functionality to start the GUI and open an image file from the command line.

Also embedded a sample image file to the function. Type 'GRABIT -sample'.

21 Mar 2005

Added the functionality to start the GUI and opening an image file from the command line.

Also embedded a sample image file into the fuction. Type 'grabit -sample'.

27 Dec 2005

Use IMAGE instead of IMSHOW for compatibility (does not require Image Processing Toolbox).

27 Dec 2005

Use IMAGE instead of IMSHOW for compatibility (does not require Image Processing Toolbox).

27 Dec 2005

Use IMAGE instead of IMSHOW for compatibility (does not require Image Processing Toolbox).

03 Mar 2006

Major code change. Added zoom feature during calibration. Added panning feature.

03 Mar 2006

Bug fix (typo)

13 Mar 2006

Animate view change and zooming for a better visual perception.

23 Mar 2006

Added mouse features: double-click to center view. right-click and drag to zoom. other minor code changes.

23 Mar 2006

Added mouse features: double-click to center view. right-click and drag to zoom. other minor code changes.

04 May 2006

Fixed loadImageFcn bug.

01 Sep 2016

Updated license

Contact us