3.9.12 Text Label Options
Programming Control .... The Object Name field contains the name, whose text$ attribute can be changed either arbitrarily or with some text label options to substitute worksheet information.
Every text label on a graph or worksheet has a text object name. To get that name, select the text label by clicking on it with your mouse, right click, and select
LabTalk supports applying existing page and dataset information to your text labels, using syntax such as:
objectName.text$ = %([workbookName]worksheetName!columnName,@option, variableName)
to refer a worksheet information variable, and in which variable options are listed in Substitution Notation
objectName.text$ = %([workbookName]worksheetName, @option, columnNumber)
to refer other worksheet information by specifying a column in worksheet.
objectName.text$ = %(PlotIndex[PlotDesignChar], @option)
to specify a data plot by PlotIndex and a column from this plot by PlotDesignChar such as X, Y or Z. This is only used for text labels on graphs.
For example in a graph legend, you may use:
legend.text$ = %(2Y, @LC);
to specify that for the 2nd dataplot in the current layer, use the comment field (of the Y column plotted) as the legend entry.
Besides legend other text object names on a graph include yl (left-side y-axis), xb (bottom x-axis), so that
yl.text$ = %(?Y,@WL); // Make the workbook long name = Y-label text
xb.text$ = %(1X,@LU); // Make the units of the X dataset the X-label
The %(?Y) is a special syntax that allows the text label to default to a pre-specified data plot index (which can be set in Plot Details: Legends/Titles: Data Plot Index for Auto Axis Titles), instead of an index (1, 2, ... n) that you supply.
In addition, in an X-Function, it is also possible to use an option such as:
legendupdate mode:=custom custom:=@option
this tells Origin: for all legend entries, report the location (in Origin Range Notation) of the data being plotted.
Most @ text-label options can be applied to any text label on both a graph or a worksheet, but some options are specially designed for certain syntax only.
For example, refer to this table for available @options for the syntax below:
%([workbookName]worksheetName, @option, columnNumber)
And this table for available @options for a different syntax:
In addition, the table below presents the available @options can be used for both the above syntax:
||Substitute Text From...
|| Column Short Name. Equivalent to @LS.
|| Dataset name
|| Column Long Name, will return to missing value if long name does not exist. Equivalent to @LL.
|| Long Name, if available, else Short Name.
|| Comments, if available, else Long Name, otherwise Short Name
|| The nth line of the Comments field.
|| First user-defined parameter.
|| The nth user-defined parameter. @LD1 is equivalent as @LD.
|| The user-defined parameter with the specified name.
|| Long Name (if not available then Short Name) and Units (if present). Equivalent to @U.
|| The name of the first User-Defined Parameter.
|| The name of the nth User-Defined Parameter.@LH1 is equivalent to @LH.
||Equivalent to @L.
|| 1st line of Comment, if available, else Long Name, otherwise Short Name.
|| 1st line of Comments (if not available then Long Name, otherwise Short Name) and Units. Equivalent to @(@LM(@LU)).
|| The first System Parameter.
|| The nth System Parameter. @LP is the same as @LP1.
|| The first User-Defined Parameter and Units (if available).
|| The nth User-Defined Parameter and Units (if available).
|| The User-Defined Parameter (specified by name) and Units (if available).
|| Column Short Name, equivalent to @C
|| Long Name (if not available then Short Name) and Units (if present). Equivalent to @LG
Note: When units are displayed in the substituted texts, the English and Japanese versions of Origin enclose the units in parentheses (), while the
German version uses square-brackets .