6.1.6 Adding a Data Plot to Existing Graph

Summary

The Plot Setup dialog can be used to add/reorder/arrange data plots in an exiting graph. This dialog provides flexibility in selecting the source data sheet and in specifying how data are to be plotted.

What you will learn

This tutorial will show you how to:

  • Use the Plot Setup dialog to add data to a graph layer
  • Use the Plot Setup dialog to group data plots in the layer
  • Use the Legend Update dialog to modify the graph legend

Steps

Choosing the Data Source

  1. Click the New Project button on the Standard toolbar, to begin with a new project.
  2. Click the Import Wizard button on the Standard toolbar. The Import Wizard opens. (Note that if this is the first time that you have started the Import Wizard, you will experience a slight delay as Origin compiles the necessary files.)
  3. Verify that the ASCII radio button is selected in the Data Type group.
  4. Click the browse button to the right of the File text box. Navigate to the Origin folder; browse to the Samples folder and then the Import and Export folder.
  5. Press CTRL and select files S15-125-03.dat, S21-235-07.dat, and S32-014-04.dat, then click Add Files.
  6. Click OK.
  7. Leave the Import Filters for current Data Type as Data Folder: VarsFromFileNameAndHeader. (This filter has the settings to use when importing the file.)
  8. Set the Import Mode as Start New Sheets.
  9. Click the Finish button. The three data files import into the workbook, each as a new sheet. You will have a book with three sheets: Trial Run 1, Trial Run 2, and Trial Run 3.

Plotting the Data

  1. Select the Trial Run 1 sheet.
  2. Highlight the D(Y) column.
  3. Click the Line button on the 2D Graphs toolbar. A new graph is created.

Adding Data to the Graph using Plot Setup

  1. Right-click on the layer 1 icon in the upper-left hand corner of the graph and choose Plot Setup.
  2. There are three panels in the Plot Setup dialog. Expand the Plot Type panel by clicking Button Expand Preview Up.png then expand the Available Data panel by clicking the second Button Expand Preview Up.png button.

    Please refer to Plotting using Plot Setup for more information.

  3. Select Layer 1 in the Plot List.
  4. Select Trial Run 2 from the Available Data list (the top-most of the three panels).
  5. Select Time as X and Position as Y.
  6. Click Add.
  7. Repeat steps 2 - 5, but add Trial Run 3 to Available Data, and again set Time as X and Position as Y, then Add the plot to Layer 1.
  8. Highlight all three plots under Layer 1, then right-click and choose Group.
  9. Click OK. You should now have a graph with three differently-colored line plots.

For information on "grouping" plots, see Grouping Data Plots in the OriginLab User Guide.

Updating the Graph Legend

The existing graph legend uses the names of the imported data plots. We will modify the legend to show the sheet name.

  1. Right-click on the legend object and choose Legend: Update Legend.
  2. From Auto Legend Translation Mode, choose Custom.
  3. For Legend Custom Format(@D, @LU etc), click the arrow to the right and choose @WS: Sheet Display Name and click OK. The graph legend now reads Trial Run 1, etc.

For more information on customizing the default legend, see these topics: