This post will show you how to mask data points on a graph and extract masked points to a new workbook automatically. When you mask or unmask more data, the workbook will be updated automatically.
We have put together a sample OPJ file in Extract_Masked_Data_Points.zip (12.2 KB) file. To learn how to make this graph, you can download this file, extract the contents and open the OPJ file. You should see the workbook Source Data which contains column X for X data and column Y for Y data, and Graph1 which is a scatter plot of Y versus X.
In this following sections, we will show you how to extract masked data points automatically.
Mask Desired Data Points on Graph
1. With Graph1 window active, click button on Regional Mask toolbar on the left side of Origin workspace, Single click on data point to mask it. Usually it change color. You can also drag a region to mask all points inside the region.
2. The corresponding datas in worksheet will also change color to indicate they are masked. See the Red cells in source sheet.
Extract Masked Data Points Automatically
To extract the masked data to a new workbook, let’s use Worksheet Query tool.
1. Activate Source Data workbook, go to menu Worksheet: Worksheet Query… to bring up the dialog.
2. Select Y in Columns: list and click button to make it show under Select Column Variables for If Test table since we want to extract data based on mask status of Y data.
3. Enter the following condition in Condition: edit box:
isMasked(i,Y) // i is built-in row index variable, Y is the Alias name.
4. Before actually extract out the data points, we can click button Test — select if true button to highlight data rows that matched with the entered condition.
5. Once we confirmed the results, we can extract the data points to a new workbook by selecting Extract to New Workbook radio box in Output group. To keep the results updated for any change in later process, we can select Recalculate mode as Auto.
6. Click OK button to extract data points.
7. Because the Recalculation mode is set to Auto, When you unmask or mask more points, the workbook will be updated automatically.