6.1.5 Plot from User Defined Graph Template


Video Image.png Video Text Image.png Website blog icon circle.png Blog Image 33x33px.png

Summary

In this tutorial, we will show you how to save a graph as an user-defined template and plot new data into the saved custom template. There are two types of graph templates available in Origin: standard template and cloneable template. Cloneable template can be easily used to clone a graph from a new workbook/worksheet, in spite of the complexity of data composition in target graph, but with one prerequisite that new data should share same data structure with the data in target graph. In comparison, standard template has more freedom over data source but lacks of the ability to duplicate a graph with complicated layer hierarchy or data structure.

This tutorial will show you how to:

  • Create and save a graph as standard template
  • Plot new data into a standard template
  • Save a graph as cloneable template
  • Plot data with same data structure into a cloneable template

Standard Template

Create and Save a Standard Graph Template

This tutorial is associated with <Origin EXE Folder>\Samples\Tutorial Data.opj.

  1. Open the Tutorial Data.opj and browse to the folder Custom Axis Scale to Show Different Scale Range.
  2. Highlight column B Exothermic Energy and C Energy-SD, click scatter button Button Scatter.png on 2D Graphs toolbar to make a scatter plot with Y error bar.
  3. Next we want to customize the symbol to be solid circle with blue color, to do so double-click on any data point on the graph to bring up Plot Details - Plot Properties dialog.
  4. Make sure first plot under Layer1 branch is selected on the left panel. Go to Symbol tab. Select solid circle from the down-sided triangle button under Preview and set Symbol Color to be Blue in the Single tab of Color Chooser. Click OK.
    Plot From User Defined Template 01.png
  5. To save it as standard template, right click on Graph1 window title bar and select Save Template As... to open dialog.
  6. Input BlueCircle as Template Name and add some descriptions Blue solid circle in Template Description edit box.
  7. If you want preset the long name of newly created graphs to be the first plot's long name, click the more options button next to Preset Graph Long Name edit box and select @LL: Long Name. %(1,@LL) will show as Preset Graph Long Name.
  8. Make sure Mark as Cloneable Template box is unchecked, click OK button to save it as standard template.

Plot New Data into Standard Template

  1. Go back to workbook, highlight columns Temperature and Temperature-SD and go to menu Plot: My Templates: BlueCircle (UserDefined) to make the graph. The graph window long name is Temperature.
Plot From User Defined Template 02.png

Cloneable Template

Save Graph as a Cloneable Template

  1. Press F11 key or select Help: Learning Center to open the Learning Center dialog. Select Graph Sample in the left-side panel, and seach for Raman.
  2. Double-click on the graph that is returned to open the Raman Spectrum subfolder.
  3. Graph Raman Spectrum is plotted from data in different worksheets of workbook Peak1 also with data labeling. It's hard to plot new data like this with one click using standard graph template. So let's save this graph as a cloneable template and clone this graph using data in workbook Peak2.
    Plot From User Defined Template 03.png
  4. To do so, right click on graph Raman Spectrum window title bar and select Save Template As... to open Utilities\File: template_saveas dialog.
  5. Input MyPeakTemplate as Template Name. Now we want to use Raman Spectrum + Workbook Long Name as graph Long Name. To do so, click more options button next to Preset Graph Long Name edit box and select @WL: Book Long Name to insert the right part first. Then input Raman Spectrum in front of added %(1, @WL).
  6. Make sure Mark as Cloneable Template box is checked, expand this node and match up the columns and worksheets by setting Match Plot Columns by and Match Sheet by to Index.
  7. Click OK button to exit the dialog and save the template.
Plot From User Defined Template 04.png

Clone a Graph Using Cloneable Template

  1. Activate the workbook with title Peak2 and click Plot: Template Library to bring to open the Template Library.
    Plot From User Defined Template 05.png
  2. Click to select the cloneable template (indicated by Dolly icon) MyPeakTemplate and click Plot button to clone the graph.
    Plot From User Defined Template 06.png
  3. Alternatively you can activate workbook Peak2 and go to menu Plot: My Templates: MyPeakTemplate (UserDefined) to directly clone the graph.