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.
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).
| Mask data
| Mask: Range
| Mask the selected data range. Masked data will display in the mask color (graph, worksheet).
| Unmask data
|Mask: Clear Range
| Unmask the selected data range. Unmasked points are included in analysis operations and plot "normally" (graph, worksheet).
| Swap mask
| Mask: Swap
| Swap masked and unmasked points in the active dataset (graph).
| Change mask color
| Mask: Change Color
| Change the mask color of the masked data range (graph).
| Hide/Show masked points
| Mask: Hide
| Toggle display of masked points ON and OFF on-screen, and in printed and exported graphs (graph).
| Disable masking
| 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:
- 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.
- 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.
- 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
|Mask data points by rectangular region. Only the data points inside the rectangle that you drag out, will be masked.
|Mask data points by freehand region. Only the data points inside the region that you drag out, will be masked.
|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.
- Choose either the Unmask Points on the Active Plot tool or the Unmask Points on All Plots of Active Layer tool on the Tools toolbar.
- 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 tool.
Mask Mini Toolbar Button (worksheet)
When worksheet data are selected -- cells or entire columns -- A Mini Toolbar Mask Data button 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).
- With the data selected (cells or one or more columns), choose Column: Mask Cells by Condition. This opens the colmask dialog.
- Choose your Condition and Value, plus other options as needed and click OK.