While useful, legacy datasets can often be a difficult to analyze, especially when they lack tables with raw values. Fortunately Origin’s digitizing tool makes it possible to convert older graphs from images to Origin graphs with editable data. In this blog post we’ll be covering the basics of the digitize tool and how it can be used to import older multi-axis graphs into Origin. You can see the end result of this post, and follow along in Origin with this OPJ.
To get started, right click on the above graph image and copy it. Then in Origin, open the digitizer tool by going to Tools>Digitizer (towards the bottom of this menu). In this dialog, click the magenta folder icon to import the graph image from the clipboard.
The resulting windows should look something like the screenshot below-. If you don’t like the gray background, you can choose Image: Clear Background to clear it.
Notice that the digitizer places 4 straight lines over our graph image. These lines serve as reference points for our data; they can be placed anywhere within the graph or at its boundaries, with blue and red representing lesser and greater values respectively.
By putting these adjacent to our grid/axes lines, we can see that the graph is not perfectly square. To modify this we’ll need to use the rotation tool.
In the rotate dialog, set the increment to 0.1 and then use the right facing arrow to adjust the image until you find the correct rotation angle. Note: You can press A key and scroll your mouse wheel to zoom in the image to better adjust angles. Once you’re satisfied that your axes are parallel with the digitizer lines, click and drag these 4 lines until they are parallel with the edges of your graph. Make any final adjustments to your lines, then go to the “Axis Value” cells in the above table and set the x and y max/min values. In this case our x range will be from 1919 to 1939 and our y range from 0 to 9. After entering these values in their corresponding cells, click OK. If you want to readjust the axes later on, you can do this by going to Axes>Edit Axes in the digitizer window.
Now let’s begin digitizing the data. There are 4 ways of doing this, we can either manually select each point on our line, or the 3 different auto trace buttons, such as Auto Trace Line by Points tool.
This tool allows the user to double-click a point on a line (or alternately single click and press ENTER) to automatically select all points that Origin associates with that single line.
You may have to do this on different segments of your line to select it in its entirety. After click Done button, on Data tab of Digitizer dialog, you will see Line 1 with number of points traced info. You can click Reorder Points button so the x values are ordered from smallest to biggest. You can click Go to Data button to view the gemerated data.
Once we’ve selected the entirety of the line with this tool, we may need to remove some of the autotraced points if they’ve spilled over onto a gridline or axis. To remove these points with any accuracy it may be easier to zoom in to the graph before selecting the region of interest. To do this, we’ll select the delete points button
To digitize our second line, click New Line button or select Digitize>New Line menu first.
For the second line, auto trace may not work for all segments of the line. So you can use auto trace in some segments, while manually pick points in some other segments. As long as you didn’t click New Line button, points collected by all tracing methods will be for one line. .
It may also be a good idea to click the “Reorder Points” button to make sure the x values are sorted from min to max.
Repeat these steps for the third line, and then let’s begin digitizing our inset graph. To digitize points in a second set of axes, click New Line button to start a new line on Data tab and set group as 2.
Then with this new line selected, click Axes 2 tab and select Axes: Edit Axes menu to set reference lines and edit axis values. Then digitizer the line in inset graph. Note: Data traced in group 1 will not be affected and for points already traced, if you later edit axis for that group, the line values in that group will be updated automatically.
With all points digitized, we can now use the following buttons to view our graphs as well as the worksheet data associated with them–
To view our original data, go to the Data tab in the digitizer (where your lines are listed), select a line from group 1 and click the “Go to graph” button. This should reveal the line plot shown in the top left figure. If you want to view your inset data as a plot, do the same with the line from group 2 selected.
To bring our group 2 data into an inset graph, go back to the initial data plot and select the Inset graph button on the right hand side of the workspace.
To populate this inset layer with data, we can go to the Digitizer and select the “Go to worksheet” button, or alternatively open the “DigiData” worksheet in Project Explorer. In this worksheet go to the PickedData4 column on the far right, select your data cells and move your cursor to the right of the selected column until the graph cursor appears . Once the cursor changes, you ‘ll be able to drag and drop your data into the inset graph axes.
With some basic adjustments in the axes and plot details dialogs, we can change our formatting to match the appearance of our original graphs, making an model of the original data available for curve fitting and other rudimentary analyses.
To add the min and max values as labels on the x-axis without changing the tickmark intervals, you’ll need to go into the Axis Dialog>Special Ticks and set the Axis Begin and End to “Show”.
Because the inset graph shows the year 1919, but not 1920, you’ll need add another Special Tick by entering 1920 in the At Axis Value box and uncheck the tickbox that appears in the Show column.