6.5.6 Line Graph with Masked Data


Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png

Summary

You can masking subranges of data graphically. In this tutorial, a line graph is created first, then the masking tool is used to mask the low peaks on the graph.

Graph Gallery Line Graph With Masked Data 7.png

Minimum Origin Version Required: Origin 2015 SR0

What you will learn

  • Plot a line graph
  • Set the scales of axes
  • Mask data on the line graph

Steps

  1. Start with an empty workbook. Select Help: Open Folder: Sample Folder... to open the "Samples" folder. In this folder, open the Graphing subfolder and find the file Line_Graph_with_Masked_Data.txt. Drag-and-drop this file into the empty worksheet to import it.
  2. Highlight both columns in the worksheet and select Plot > Basic 2D : Line from the Origin main menu to plot a line graph.
    Graph Gallery Line Graph With Masked Data 2.png
  3. Double click on the X axis to open the Axis dialog box. Set the increment value to 0.25 as in the image below:
    Graph Gallery Line Graph With Masked Data 3.png
  4. Click the Vertical icon on the left panel to set the Y axis scale as in the following image:
    Graph Gallery Line Graph With Masked Data 4.png
  5. Click OK to close the Axis dialog and delete the graph legend. Change the X label to Time[s] and the Y label to Signal[A.U.], and bold both text labels and set the font size as 28. Create a title by adding a text object that says Time Series. Bold the title and set the font size of the title to 36.
    Graph Gallery Line Graph With Masked Data 5.png
  6. Activate this graph, then click and hold the Regional Mask Tool button on the Tools toolbar until a menu appears. Select Mask Points on Active Plot to enter masking mode.
    Graph Gallery Line Graph With Masked Data 6.png
  7. Click an appropriate place on the graph and drag out a rectangle to select the low peaks and, at the same time, mask them. Drag out additional rectangles until all low peaks are masked. Then click the Pointer button on the Tool toolbar to exit masking mode.
    Graph Gallery Line Graph With Masked Data 7.png

Beginning with Origin 2021, there is a change to data point selection mode of the masking tools:

  • Default is changed from mask by row index number to mask by rectangular region.
  • Otherwise, behavior remains as before: change masking mode by pressing Spacebar.
  • You can use system variable @MTI=1 (persistent) to revert mask by row index as default.