Extract Data Points from a Plot

posted in: Graphing | 0

Origin User always runs into the scenario that he/she wants to emphasize on a small region on the plot. Origin has the Screen reader and Data reader menu bar tool that enable user to obtain the coordination of the data points of interest. However what if the user has the need to save the interesting data points into a worksheet for more investigation? In this blog I will step you through the ways of extracting individual data points as well as a range of data points into a worksheet.

Extract data points one by one:

  1. Open Origin and start a new worksheet. Import the Raman Baseline.dat under \Samples\Spectroscopy\ folder.
  2. Highlight column B  and make a scatter plot.
  3. To have a better presentation of the plot, double click the plot to launch the Plot Details dialog. Under Symbol tab, click the Preview dropdown list and select the solid circle symbol.  Set the Size to 3. Click OK, the curve should look like:
    datapickerinit
  4. With the graph activated, go to Windows:Command Window (Shift+Alt+3).  type  pickpts and press Enter.
    datapickercommand
  5. The mouse cursor changes into a data reader cursor and a blank workbook is created to collect picked points.
  6. You can double click points on plot to collect them, or single click on a point. Then press Enter to collect.
  7. For dense plot like this, we can zoom in to pick points precisely. For example, To pick the peak around x=470, first move the mouse near the peak. With Z key pressed down, use mouse wheel to zoom in the x direction.  you can also hold down shift+Z and use mouse wheel to zoom in y direction. With Z press down, you can also drag and move the curve with the mouse. The scale will change accordingly. More hotkeys can be found on the webpage. After playing around with these tricks, we are able to locate our mouse to the very top of the peak in the graph. 
    datapickerzoomin
  8. Once we target the data points, double click or press Enter to select it. Then we can continue to select next point. After picking all points you are interested in, press Esc key to finish the process. All the data points’ ordinates are put to the workbook. 
    datapickerselected

Note:

  1. .The maximum number of data points can be selected in the graph is 10. If you may pick up to 30 points, you can run pickpts npts:=30
  2. This pickpts is an X-Function. So you can run pickpts -d to open the dialog to see all options, including if you are using data reader or screen reader when selecting points. If you choose Screen Reader mode, you can pick places on the screen where there is no data plot.
  3. Pickpts can pick points on different curves and different layers.

 

Extract a range of data points on the curve ( Using selection on Active Plot tool ):

  1. With the Raman baseline curve activated. Click datapickerselectbutton on the left side menu bar. Select a range of data points in the curve and press Esc.
  2. Then right click the plot to select it and choose Copy Range
    datapickercopyrange
  3. Create a new worksheet. In any cell in the worksheet, right click and select paste to output the data.

 

Extract multiple ranges of data points on the curve ( Using Cluster tool ):

  1. Origin also has the cluster gadget that can extract ranges of data points in the plot.
  2. With the graph activated, select Gadgets: Cluster…. In the pop-up dialog, keep the default settings and click OK.
  3. A setup dialog window pops up and a rectangle showing the region of interest (ROI) shows up in the graph.
  4. Move and resize the rectangular to cover the data of interest.
    datapickerclusterrange
  5. Click the Copy Data button in the window. The data points covered by ROI is then copied. 
    datapickerclusterpan
  6. Create a new worksheet. Select any cell in the worksheet, right click and select Paste to paste the selected data.
  7. Now move the yellow ROI box to another region and repeat the process.

Note: The Cluster gadget is a powerful tool. Other than outputing data points to worksheets, it can perform basic statistics on the clustered data, edit data points using menu options or buttons, etc. You can also switch between rectangular to elliptical ROI by selecting Settings:Using circular ROI Box . We won’t go to more details about this gadget. You may refer to this webpage as you desire.

Note: Origin also has a useful tool called Digitizer which can digitize data from images or screenshot. With Digitizer, user imports from image file or clipboard and digitize data points by manually picking points one by one or using different auto tracing methods. If you are interested, please refer to this webpage.

Leave a Reply