Tracer

Tracer is a utility for digitizing data from images of graphs (which could be screenshots or scans). The image is scaled according to the plot axes, and data are created in an attempt to follow a trace across the image between endpoints marked by cursors. The data are extracted at the resolution of the image (one data point per pixel). When the trace does not form a continuous path between the cursors (owing to poor image resolution or dashed or dotted line types), the procedure attempts to search for the next line segment. Tracer distinguishes between different trace colors.



If you want to digitize data as individual points picked from a graph image, check out the Wavemetrics procedure IgorThief. Look under File > Example experiments > Techniques > Trace Graph.

Note that (unlike Trace Graph) Tracer doesn't make any correction for image skew, i.e. the axes are assumed to run parallel to the edges of the image.

How to use Tracer:

  • Select Tracer from macros menu.
  • Load and display an image using the buttons in the Image Selection area of the Tracer panel.
  • Set Scale: Check boxes for log axes as needed, toggle SetScale cursors on and off with the button. Type cursor positions in the SetVariable controls. Make sure the cursor positions are accurately reported before moving on.
  • Select trace color in the color selector area of the Tracer panel. To sample colors from the image, look for the eye dropper icon in the color-picker dialog.
  • The 'fuzziness' slider affects how picky the tracer is about colors. You may have to adjust this setting for tracing to work.
  • Extract: Select a name for the wave that will be created with the extracted data.
  • Place cursors A and B at start and end of a trace and click on 'Extract Trace' to start digitizing.
  • Play with the gaps, jump threshold, and minimum range settings to deal with incomplete lines and other problems.
  • If you're tracing a series of open symbols, use the minimum range setting to avoid tracing the symbol stroke.
  • If needed, you could use interpolate to clean up your traced data.

If you want to help Tracer to take the right path where traces cross one another, you can use the image editing button to touch up the image. Hold down the control key and click with the mouse to paint pixels with the trace color, or the option key to paint with the background color. Expand the graph view for more detailed editing. Use command/ctrl + scroll to zoom in and out, hold the shift key to accelerate zoom.

If tracing fails, be sure to try changing the fuzziness, jump threshold and gaps settings.

Images:

tracer logo

Project Details

Current Project Release

Tracer IGOR.8.00.x-5.40

Release File: Tracer540.zip
Version: IGOR.8.00.x-5.40
Version Date: Wed, 04/14/2021 - 07:09 am
Version Major: 5
Version Patch Level: 4
OS Compatibility: Windows Mac-Intel
Release Notes:

fixes bug that positioned setvars incorrectly on windows when large fonts are selected in system settings

View All Releases

Hi Tony,

this is awesome! IgorThief is one of my favorites, but extracting smooth curves from plots is always a bit tricky!

Thanks a lot!

Christian

 

Edit: Just realised that this exists quite a while! Shame that I missed this all the years!

Hi Tony, I use the tracer package for some years now and like it a lot! I have two suggestions for improvements:

1) If I want to extract several traces from a graph, I usually first prepare a separate picture for each trace and color the trace I want in a distinctive color. Then I load the pictures successively and extract each trace. Since the size of each picture is exactly the same, I reuse the assigned scale. Currently, I have to dive into the package folder and copy over the scale manually. It would be nice to have a method to apply scales from one picture to another in the panel.

2) I am someone who wants to be extra precise, so I zoom in when placing the cursors. It would be nice to have a magnified view around the mouse cursor always open (also showing the cursor placement), to avoid this step.

In Version 5 you can right click on the image to copy and paste image scaling. See the notes in the file header for other changes.

Tony, thank you for this great update! Looks very sleek. One detail, though: Using the alt key on windows does not work because alt enables the image drag mode, so s.wheelDy seems to get eaten. Using shift (s.eventMod&2) instead would work fine.

Rats. I started out using cmd-shift, but I find that when using my mouse the shift key transforms dY to dX. That doesn't happen with the trackpad, so the code wouldn't work for both. I tried using cmd-shift + max (dX, dY), but then the zoom gets jerky when dX ~ dY. The cmd-option key combination seems to work fine on mac, despite option being the drag key. That's frustrating, because I've very quickly grown used to scroll-to-zoom. It works okay with just the control key, right?

Tony, no problem. A workaround would be to use Option on Mac and Shift on Win, but control-key only works good enough.

Forum

Support

Gallery

Igor Pro 8

Learn More

Igor XOP Toolkit

Learn More

Igor NIDAQ Tools MX

Learn More