Plot Columns by Selecting Column Labels and Skip Others

Sometimes customers may input all data within one worksheet but only want to plot selected columns that share a common name, or part of the name, etc. This post shows how to use the newly added Edit: Select Dialog box in Origin 2016 to select columns all at once. For users with earlier versions, this post also shows how to sort columns by name in Plot Setup dialog which is less efficient than Edit: Select Dialog.

Please download files plot_columns_with_same_label, which includes a .dat file and an .opj Origin project file with results.

Open the project file and go to Folder1, drag-and-drop the raw_data.dat file from Windows Explorer into Book1.


The file contains data for 19 compounds. Each compound includes an X column (wavelength), and two Y columns (Absorption and Time).

Highlight the whole worksheet, right-click and select Set As: XYY XYY to ensure that there is a correct relationship between columns.


Suppose you want to plot Absorption vs Wavelength for all the compounds, you can press down the Ctrl key and select all Absorption columns. However if there are many compounds within one worksheet, it is cumbersome to select all columns individually.


For version Origin 2016 and later:

To begin Select Edit, listed on the toolbar, and select Select …


The Select Dialog box will appear. In the Mode drop down window select By Column Label, and in the Label drop down box select Long Name. Input A* into the String boxto specify to Origin to search for all Long Names that begin with the letter ‘A’. Select Test- Select if True in order to select columns.

With the columns selected, now you can select Plot and select Line to immediately graph all compounds for Absorption vs. Wavelength.

A second method is to select columns by skipping column numbers. If columns are already selected in the worksheet, unselect the columns by clicking on one of the boxes in the worksheet. With the Select Dialog box open, in theMode drop down box select By Select N columns and Skip M columns. Input 1 for N= to specify that one column will be selected, input M=2 to specify to skip 2 columns, and input 2 for Start to specify to begin selection at column 2. Select Test- Select if True. Again all columns with the Long Name ‘Absorption’ are selected.


For all versions of Origin:

So instead, let’s make sure nothing is selected and choose Plot:Line:Line menu. Plot Setup dialog will open.

  1. There are two modes in middle panel of Plot Setup dialog. Click on the double arrow button on upper-right corner of the middle panel so only plottable columns, such as Y columns show. In this case only Absorption and Time columns show.
  2. Click on Long Name to sort by column Long Name.
  3. Highlight all Absorption columns.
  4. Click on Add button to add in Layer 1.
  5. Click OK.




This way, only Absorption columns are plotted.

To finish the look, click on any plot to select the whole plots. Use Line/Border Color button on Style toolbar to apply Rainbow palette.  Increase thickness on Style toolbar as well. 4

Add top and right axes, and customize scale from Axis dialog. You can see the final graph under result folder of the opj file.


Leave a Reply

Your email address will not be published. Required fields are marked *