10.1.4 Masking Data Points in the Graph or Worksheet

Masking is another technique that you can use when you want to analyze only a subset of your data, or when you have data points that you do not want included in your analysis. Masking or unmasking data will trigger recalculation of linked operations.

  • You can mask data points in worksheets or graphs.
  • When masking data in the graph, the corresponding worksheet data is also marked as masked (by default, in a red font).
  • Mask toolbar buttons work on both graphs and worksheets.
  • Tools toolbar buttons work on graphs.
  • When data are selected in the worksheet, a Mini Toolbar Mask Data button becomes available.
  • Additionally, you can mask worksheet data by mathematical condition.
  • Origin 2022 adds Masked and/or Unmasked Data Count to the active worksheet statistics that can be reported to the Status Bar.
  • Origin 2024b adds Copy > Copy Mask Status context menu to copy mask locations from column(s) to other column(s)

Masking with the Mask Toolbar (worksheet, graph)

These toolbar buttons are used to mask and manipulate masking of selected data. Note that this includes graphs, once data have been selected (see the next section on Tools toolbar buttons for graph selection).

Action Toolbar Button Shortcut Command Notes
Mask data Button Mask Range.png Mask: Range Mask the selected data range. Masked data will display in the mask color (graph, worksheet).
Unmask data Button Unmask Range.png Mask: Clear Range Unmask the selected data range. Unmasked points are included in analysis operations and plot "normally" (graph, worksheet).
Swap mask Button Swap Mask.png Mask: Swap Swap masked and unmasked points in the active dataset (graph).
Change mask color Button Change Mask Color.png Mask: Change Color Change the mask color of the masked data range (graph).
Hide/Show masked points Button Hide Or Show Masked Points.png Mask: Hide Toggle display of masked points ON and OFF on-screen, and in printed and exported graphs (graph).
Disable masking Button Disable Or Enables Masking.png Mask: Disable Masking Toggle the mask ON or OFF for all masked data in the worksheet. When toggled OFF, all data points are analyzed and included in printed and exported graphs (graph, worksheet).

Beginning with Origin 2022, the Status Bar can display Masked and/or Unmasked Data Count in the sheet.

Masking with the Tools Toolbar (graph)

There was a change made to the default masking mode, starting with Origin 2021:

  • Default is changed from mask by row index number to mask by rectangular region.
  • Otherwise, behavior remains as before: toggle between masking modes (see next) by pressing Spacebar.
  • Use system variable @MTI=1 (persistent) to revert to mask by row index as default.

To mask points, click on the graph window to activate it:

  1. Choose Data: Mask Data Points from the main menu or click the Mask Points on Active Plot button or Mask Points on All Plots button on the Tools toolbar, then hover on the graph.
  2. To mask a single point, double click on the point. To mask a region of points, press the Space bar to toggle among masking by row index number, by rectangular region or by freehand region (differences explained below), then drag out a region.
  3. Once data are masked in the graph, you can use the Mask toolbar buttons, described above.
Mask Points on Active Plot Mask Points on All Plots of Active Layer Purpose
Masking Data in Graphs-3.png Masking Data in Graphs-8.png Mask data points by rectangular region. Only the data points inside the rectangle that you drag out, will be masked.
Masking Data in Graphs-4.png Masking Data in Graphs-9.png Mask data points by freehand region. Only the data points inside the region that you drag out, will be masked.
Masking Data in Graphs-6.png Masking Data in Graphs-7.png Mask data points by row index number. All data points between the lowest and highest selected index numbers are masked regardless of whether they lie inside your rectangle.

To remove the mask from data points in the graph window:

  1. Choose either the Unmask Points on the Active Plot Button Unmask On Active Plot.png tool or the Unmask Points on All Plots of Active Layer Button Unmask On All Plots.png tool on the Tools toolbar.
  2. Use the space bar, as needed, to choose points by index, rectangular region or by freehand region, then drag to unmask your data points. The tool will be active until press ESC or click the Pointer Button Pointer.png tool.

Mask Mini Toolbar Button (worksheet)

When worksheet data are selected -- cells or entire columns -- A Mini Toolbar Mask Data button Popup Mask Unmask Data.png becomes available. The button works as a toggle to mask or unmask data within the selection.

Mask Cells by Condition (worksheet)

There is a tool for masking worksheet data values by condition (e.g. <= 0).

  1. With the data selected (cells or one or more columns), choose Column: Mask Cells by Condition. This opens the colmask dialog.
  2. Choose your Condition and Value, plus other options as needed and click OK.