Graph windows are created from graph template files. Origin graph template files have an OTP file extension. Origin ships with a large number of built-in graph templates (system templates). These templates are used to create all of Origin's 100+ graph types and they can be modified and saved, to preserve your custom settings.
A graph template file differs from a graph window file (.OGG) in that templates do not store data. Rather, graph template files store important page and layer characteristics (page size, number of layers, scaling of text and drawing objects, etc.) and they also store data plot style information (plot type, plot colors, data labels, etc.). For more information, see "Attributes saved with the graph template," below.
To save the active graph window as a graph template (.OTP) file:
or
Both actions open the open the template_saveas dialog box. For information on dialog box controls, see Saving a customized window as a template.
The graph page, each graph layer on the page, the axes, the tick labels, the axes labels, and text or object annotations, as well as the data plots, all have properties that can be saved to a graph template.
Attributes controlled from the Plot Details dialog box are saved with a graph template:
The attributes controlled by these dialog boxes are saved with the graph template:
Additionally, the following graph window properties are saved to the template:
Notes:the graph Long Name/Short Name preset method can be accessed by theme. In the Save Format as Theme dialog, find branch
|
Finally...
The details (or data plot styles) of each of the data plots in your graph window are saved in data plot style holders. Data plot style holders contain information about the type of data plot (for example, scatter, line, or column) and the settings for the data plot (for example, the settings on the Plot Details Symbol tab). When you save a graph window as a template, each data plot in each layer of the graph window has an associated data plot style holder.
Thus, when you create a graph based on this custom template, for each layer in your graph, the first data plot in the layer will display according to the information stored in the first data plot style holder for that layer. The second data plot in the layer will display according to the information stored in the second data plot style holder for that layer, and so on. As you add data plots to the layer, Origin searches for a data plot style holder that is not currently in use (for example, if you removed a data plot from the layer contents), and displays the data plot using the first data plot style holder found. If you add more data plots to the layer than there are style holders, Origin will display the data plot using the information in the last data plot style holder.
You are allowed to use specific commands to save some LabTalk scripts with the graph template. Here will have two commands supported since Origin 2021b:
To execute a LabTalk command during plotting the graph,
To execute a LabTalk command after plotted a graph,
For example, if you want to "Fit Page to Layers" with Border Width = 8 after plotting, you can run
page.info.system.plotting.LTAfter$="pfit2l borderwid:=8;"