<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin</id>
	<title>STX Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Admin"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php/Special:Contributions/Admin"/>
	<updated>2026-05-06T06:51:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/f0sp&amp;diff=10690</id>
		<title>Programmer Guide/Command Reference/EVAL/f0sp</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL/f0sp&amp;diff=10690"/>
		<updated>2022-11-10T10:26:04Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{EVALFunctionTemplate}}&lt;br /&gt;
A simple f0 estimation from a log. spectrum.&lt;br /&gt;
;Usage:&amp;lt;code&amp;gt;f0sp(&amp;lt;var&amp;gt;sp&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;nc&amp;lt;/var&amp;gt;)&amp;lt;/code&amp;gt;&lt;br /&gt;
:;&amp;lt;var&amp;gt;sp&amp;lt;/var&amp;gt;:log. spectrum&lt;br /&gt;
:;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;:frequency resolution in Hz&lt;br /&gt;
:;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;:minimum range for component search&lt;br /&gt;
:;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;:maximum range for component search&lt;br /&gt;
:;&amp;lt;var&amp;gt;nc&amp;lt;/var&amp;gt;:number of f0 components&lt;br /&gt;
;Result: f0 in Hz. Set to 0 if detection fails.&lt;br /&gt;
;Description:&lt;br /&gt;
# find all spectral peaks in the selected frequency range&lt;br /&gt;
# select the nc highest peaks&lt;br /&gt;
# find the smallest frequency difference of the selected peak (use lowest peak frequency as start value)&lt;br /&gt;
# use this difference to compuet harmonic mean of selected peaks&lt;br /&gt;
&lt;br /&gt;
[[../#Functions|&amp;lt;function list&amp;gt;]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer/Segments_Dialog&amp;diff=8467</id>
		<title>User Guide/Waveform and Segmentation Viewer/Segments Dialog</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer/Segments_Dialog&amp;diff=8467"/>
		<updated>2015-12-18T11:29:29Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{V1}}&lt;br /&gt;
The segments dialog is displayed on the right side of the [[User Guide/Waveform Plot and Segmentation/Control Dialog|control dialog]].&lt;br /&gt;
&lt;br /&gt;
[[File:viewer_dialog_segments.png]]&lt;br /&gt;
&lt;br /&gt;
It consists of a fixed part (the segment definition and the buttons) and a user defined part (the segment attributes). The controls for the attributes (in the example: Typ, Speaker, TR1, TR2) are defined in the associated audio segment template.&lt;br /&gt;
&lt;br /&gt;
;ID:The ID (name) of the selected / new segment.&lt;br /&gt;
;Auto:Copy the next automatic segment name into field ID. The name format can be configured with the automatic segment names dialog.&lt;br /&gt;
;Seg.:Position and length (task expression) of the selected / new segment.&lt;br /&gt;
;Crs.:Use the position of the current cursor(s) to update the Seg. field.&lt;br /&gt;
;Ch.:Channel attribute value of the selected / new segment.&lt;br /&gt;
;Clear:Reset all segment attributes to default / empty values.&lt;br /&gt;
;Save:Save segment attributes. If a marker is selected, the segment is updated, otherwise a new segment is created.&lt;br /&gt;
;Edit:Save segment attributes and display the segment properties dialog (without dialog-template).&lt;br /&gt;
;Typ, Speaker, TR1, TR2:Controls containing the user defined attributes of the selected / new segment. The controls for the attributes (in the example: Typ, Speaker, TR1, TR2) are defined in the associated audio segment template. The fields ID, Seg., Ch. and the attribute fields are updated automatically when a segment marker is selected.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer/Segments_Dialog&amp;diff=8466</id>
		<title>User Guide/Waveform and Segmentation Viewer/Segments Dialog</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer/Segments_Dialog&amp;diff=8466"/>
		<updated>2015-12-18T11:28:44Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{V1}}&lt;br /&gt;
&lt;br /&gt;
The segments dialog is displayed on the right side of the [[User Guide/Waveform Plot and Segmentation/Control Dialog|control dialog]].&lt;br /&gt;
&lt;br /&gt;
[[File:viewer_dialog_segments.png]]&lt;br /&gt;
&lt;br /&gt;
It consists of a fixed part (the segment definition and the buttons) and a user defined part (the segment attributes). The controls for the attributes (in the example: Typ, Speaker, TR1, TR2) are defined in the associated audio segment template.&lt;br /&gt;
&lt;br /&gt;
ID&lt;br /&gt;
&lt;br /&gt;
The ID (name) of the selected / new segment.&lt;br /&gt;
&lt;br /&gt;
Auto&lt;br /&gt;
&lt;br /&gt;
Copy the next automatic segment name into field ID. The name format can be configured with the automatic segment names dialog.&lt;br /&gt;
&lt;br /&gt;
Seg.&lt;br /&gt;
&lt;br /&gt;
Position and length (task expression) of the selected / new segment.&lt;br /&gt;
&lt;br /&gt;
Crs.&lt;br /&gt;
&lt;br /&gt;
Use the position of the current cursor(s) to update the Seg. field.&lt;br /&gt;
&lt;br /&gt;
Ch.&lt;br /&gt;
&lt;br /&gt;
Channel attribute value of the selected / new segment.&lt;br /&gt;
&lt;br /&gt;
Clear&lt;br /&gt;
&lt;br /&gt;
Reset all segment attributes to default / empty values.&lt;br /&gt;
&lt;br /&gt;
Save&lt;br /&gt;
&lt;br /&gt;
Save segment attributes. If a marker is selected, the segment is updated, otherwise a new segment is created.&lt;br /&gt;
&lt;br /&gt;
Edit&lt;br /&gt;
&lt;br /&gt;
Save segment attributes and display the segment properties dialog (without dialog-template).&lt;br /&gt;
&lt;br /&gt;
Typ, Speaker, TR1, TR2&lt;br /&gt;
&lt;br /&gt;
Controls containing the user defined attributes of the selected / new segment. The controls for the attributes (in the example: Typ, Speaker, TR1, TR2) are defined in the associated audio segment template.&lt;br /&gt;
&lt;br /&gt;
The fields ID, Seg., Ch. and the attribute fields are updated automatically when a segment marker is selected.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer/Segments_Dialog&amp;diff=8465</id>
		<title>User Guide/Waveform and Segmentation Viewer/Segments Dialog</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Waveform_and_Segmentation_Viewer/Segments_Dialog&amp;diff=8465"/>
		<updated>2015-12-18T11:27:14Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{UG_V1}}&lt;br /&gt;
&lt;br /&gt;
The segments dialog is displayed on the right side of the [[User Guide/Waveform Plot and Segmentation/Control Dialog|control dialog]].&lt;br /&gt;
&lt;br /&gt;
[[File:viewer_dialog_segments.png]]&lt;br /&gt;
&lt;br /&gt;
It consists of a fixed part (the segment definition and the buttons) and a user defined part (the segment attributes). The controls for the attributes (in the example: Typ, Speaker, TR1, TR2) are defined in the associated audio segment template.&lt;br /&gt;
&lt;br /&gt;
ID&lt;br /&gt;
&lt;br /&gt;
The ID (name) of the selected / new segment.&lt;br /&gt;
&lt;br /&gt;
Auto&lt;br /&gt;
&lt;br /&gt;
Copy the next automatic segment name into field ID. The name format can be configured with the automatic segment names dialog.&lt;br /&gt;
&lt;br /&gt;
Seg.&lt;br /&gt;
&lt;br /&gt;
Position and length (task expression) of the selected / new segment.&lt;br /&gt;
&lt;br /&gt;
Crs.&lt;br /&gt;
&lt;br /&gt;
Use the position of the current cursor(s) to update the Seg. field.&lt;br /&gt;
&lt;br /&gt;
Ch.&lt;br /&gt;
&lt;br /&gt;
Channel attribute value of the selected / new segment.&lt;br /&gt;
&lt;br /&gt;
Clear&lt;br /&gt;
&lt;br /&gt;
Reset all segment attributes to default / empty values.&lt;br /&gt;
&lt;br /&gt;
Save&lt;br /&gt;
&lt;br /&gt;
Save segment attributes. If a marker is selected, the segment is updated, otherwise a new segment is created.&lt;br /&gt;
&lt;br /&gt;
Edit&lt;br /&gt;
&lt;br /&gt;
Save segment attributes and display the segment properties dialog (without dialog-template).&lt;br /&gt;
&lt;br /&gt;
Typ, Speaker, TR1, TR2&lt;br /&gt;
&lt;br /&gt;
Controls containing the user defined attributes of the selected / new segment. The controls for the attributes (in the example: Typ, Speaker, TR1, TR2) are defined in the associated audio segment template.&lt;br /&gt;
&lt;br /&gt;
The fields ID, Seg., Ch. and the attribute fields are updated automatically when a segment marker is selected.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7124</id>
		<title>Programmer Guide/Macro Library/XPlot</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7124"/>
		<updated>2014-05-20T13:26:00Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|4}}&lt;br /&gt;
&lt;br /&gt;
==XPlot : CObjEx==&lt;br /&gt;
&lt;br /&gt;
A general class for plotting multiple graphs.&lt;br /&gt;
&lt;br /&gt;
===XPlot Construction===&lt;br /&gt;
&lt;br /&gt;
Initialize a new XPlot-instance to display 1 or more graphs. Returns the new object or an empty string. Information and error messages are written to the &amp;lt;code&amp;gt;BSCRIPT CON&amp;lt;/code&amp;gt; console.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XPlot &amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of rows (default=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of columns for each row (inrow0 inrow1 ...). The default is one column per row.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The display window title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the graphics profile to use. A graphics profile is also known as a colour scheme.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The window position and size (in the format &#039;&amp;lt;code&amp;gt;x y width height&amp;lt;/code&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of an existing display item which should own this new window. See &amp;lt;code&amp;gt;NEW DISPLAY&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
A new &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; object if successful or an empty string.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; instance with one graph is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := xplot&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; Failed to create the xplot instance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===XPlot Member Functions===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class has the following member functions. See CObjEx Member Functions for a list of functions implemented in the parent class.&lt;br /&gt;
&lt;br /&gt;
====AddPlot====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; is identical to the &amp;lt;code&amp;gt;PLOT&amp;lt;/code&amp;gt; function, except that it adds to an existing graph (in addition to or on top of the original plot). If no graph exists at the specified &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;, then the call is passed to &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;. It supports the following plot types: &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;. The parameters are identical to the &amp;lt;code&amp;gt;[[#Plot|PLOT]]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
====Dialog====&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;Dialog&amp;lt;/code&amp;gt; can be used to show and hide a dialog in the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; display.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog &amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The ID of the current or new dialog item or an empty string.&lt;br /&gt;
&lt;br /&gt;
====New====&lt;br /&gt;
&lt;br /&gt;
Creates a new dialog item (deleting the old one first).&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog New&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Delete======&lt;br /&gt;
&lt;br /&gt;
Removes the dialog from the display and deletes the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Msg======&lt;br /&gt;
&lt;br /&gt;
Posts a message to the macro message queue. The format of the message is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgId&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgPar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when the display is closed, this function is called to post the message &amp;lt;code&amp;gt;MENU dialogItem CLOSE&amp;lt;/code&amp;gt; to the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Msg ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message ID.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message parameters.&lt;br /&gt;
&lt;br /&gt;
======On|Enabled======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog On; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Enabled; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Off|Hidden======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Off ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Hidden ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Display====&lt;br /&gt;
&lt;br /&gt;
Returns the ID of the display object associated with this &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; display&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns the display object of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
====End====&lt;br /&gt;
&lt;br /&gt;
Enters the message loop, waits until the user closes the plot display and then destroys itself.&lt;br /&gt;
&lt;br /&gt;
====Get====&lt;br /&gt;
&lt;br /&gt;
Retrieve an attribute from a specific graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Get &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of the requested attribute. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;CURSORPOSITION&amp;lt;/code&amp;gt; - Returns the current cursor positions in the following format: &amp;lt;code&amp;gt;i1 x1 y1 i2 x2 y2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that &amp;lt;code&amp;gt;x1 &amp;lt;= x2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;YDATA&amp;lt;/code&amp;gt; - Returns the y data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;XDATA&amp;lt;/code&amp;gt; - Returns the x data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;RANGE&amp;lt;/code&amp;gt; - Returns the x axis and y axis range in the following format: &amp;lt;code&amp;gt;xmin xmax ymin ymax&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; - Returns the plot type (see &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; for a list of available plot types).&lt;br /&gt;
&lt;br /&gt;
====GetFColors====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GetFColors&amp;lt;/code&amp;gt; function returns a blank separated list of the function colors defined in the selected graphics profile.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; GetFColors&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns a blank separated list of color keywords.&lt;br /&gt;
&lt;br /&gt;
====Graph====&lt;br /&gt;
&lt;br /&gt;
Returns the requested attribute &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; of the graph identified by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Graph &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; [; &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;=GRAPH ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of a graph item, an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XGraph : CObjEx|XGRAPH]]&amp;lt;/code&amp;gt; instance or the &#039;&amp;lt;code&amp;gt;row column&amp;lt;/code&amp;gt;&#039; address of a splitter in the display. Note that the &amp;lt;code&amp;gt;row&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;column&amp;lt;/code&amp;gt; indices are zero-based.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The attribute to returned. The following values are allowed:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;INSTANCE&amp;lt;/code&amp;gt; - Return the id of the &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; instance associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GRAPH&amp;lt;/code&amp;gt; - Return the id of the graph object associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. This is the default attribute.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ROW&amp;lt;/code&amp;gt; - Return the row index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;COLUMN&amp;lt;/code&amp;gt; - Return the column index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return values are selected by the argument &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;. See the description of &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; for details. If the address argument &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; do not refer to a graph, &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; or splitter of the display, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Get the graph item id for the top left graph.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#graph := $#xplot graph 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====Legend====&lt;br /&gt;
&lt;br /&gt;
Display a graph legend. Use &amp;lt;code&amp;gt;$#xplot LEGEND $#graph&amp;lt;/code&amp;gt; to clear the legend.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Legend &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;w&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;h&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text1&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text2&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph address (e.g. row and column index. See [[#Plot|PLOT]] for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit for size and position values. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt; - The real x/y values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;percent&amp;lt;/code&amp;gt; - The percent of the graph&#039;s plot area.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x, y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The position of the upper right corner of the first legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;w, h&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width and height of one legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The legend text color.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This flag selects the line attributes to be displayed. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt; - The color.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; - The color, style, width and symbol.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text for the legend for function X. If no text is supplied, the legend line is removed.This parameter can be either a string, or a simple table.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
void&lt;br /&gt;
&lt;br /&gt;
====Plot====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; can be used to plot a function in a graph. Currently, {{STX}} supports waveform , x/y (aka function and more specifically parameter), spectrogram and waterfall plots.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Plot an x/y function graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see the member function [[#Graph|GRAPH]] for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis data (a vector or an array).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data to be used for the x axis. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:A data vector with &amp;lt;code&amp;gt;y[!nrow]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. This is the default and means that the x axis uses the values &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:A blank separated list of values (&#039;x1 x2&#039; -&amp;gt; x[i] = x1+(x2-x1)/(y[!nrow]-1), i = 0..&amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be displayed in this plot.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The x axis display range. This can be one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xmin xmax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the x axis unit (e.g. &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;). The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt; plot only allows the following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the x axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ymin ymax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the y axis unit (e.g. &amp;lt;code&amp;gt;dB&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the y axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; argument (see &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; for details) or a zero-based function line index as specified in a color scheme (see Color Schemes in the User Guide).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xlabtab, ylabtab, zlabtab&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Extended tables containing the scale, grid and label definitions. For a description of the table format, please see the scale definition table for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Plot a simple x/y function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := XPLOT 1 ; 1 ; XPLOT ; Default ; 0 0 400 400&lt;br /&gt;
$#xplot plot 0 ; XYPLOT; $(eval fill(10, 0, 1)) ; * ; xyplot ; * ; ; x-axis ; * ; ; y-axis&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Plot a function graph. Note that this is identical to an &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y ; x ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter descriptions.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======parameter======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter graph. A parameter graph differs from a function graph because a parameter plot can have missing values - it does not necessarily have values for every point on the x axis.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; parameter ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======spectrogram======&lt;br /&gt;
&lt;br /&gt;
Plot a spectrogram graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; spectrogram ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A data array containing one spectrum or function line per &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; row. Note that this parameter is specific to the &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WATERFALL&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y-scale data (frequency). This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:1) &amp;lt;code&amp;gt;vData&amp;lt;/code&amp;gt; - A data vector with &amp;lt;code&amp;gt;y[!ncol]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:2) * - An asterisk: &amp;lt;code&amp;gt;y[i] = i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;. This is the default.&lt;br /&gt;
&lt;br /&gt;
:3) &amp;lt;code&amp;gt;y1 y2&amp;lt;/code&amp;gt; - Two blank separated values: &amp;lt;code&amp;gt;y[i] = y1+i*(y2-y1)/(d[!ncol]-1)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z scale is a color scale. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zdown&amp;lt;/code&amp;gt; - A numerical value. The maximum z value is chosen automatically and the minimum value is calculated as follows: &amp;lt;code&amp;gt;zmax-zdown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WATERFALL======&lt;br /&gt;
&lt;br /&gt;
Plot a waterfall graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WATERFALL ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zlabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data array (one spectrum or function-line / row).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z axis display range. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the z axis unit (e.g. &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the z axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the x scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the y scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of lines to be plotted. The default is &amp;lt;code&amp;gt;150&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WAVEFORM======&lt;br /&gt;
&lt;br /&gt;
Plot a waveform graph. Note that the displayed wave item is automatically attached to the graph. This means, no explicit call to &amp;lt;code&amp;gt;SetWave&amp;lt;/code&amp;gt; is necessary.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WAVEFORM ; &amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;XWAVE&amp;lt;/code&amp;gt; instance&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit to use on the x axis. The following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum waveform amplitude. This can be a value between 0 and ...&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be any positive number. The default is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the waveform envelope should be filled or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======TEXTBOX======&lt;br /&gt;
&lt;br /&gt;
Plot a graph containing text.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; TEXTBOX ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text color. This can be an of the {{STX}} color arguments.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The horizontal text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The vertical text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TOP&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BOTTOM&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text to be displayed. This can be a simple table with an entry per line of text or a semi-colon separated list of text lines.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======fstyle======&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;fstyle&amp;lt;/var&amp;gt; argument passed to the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; functions &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; has the following syntax and components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Determines whether the function line is solid (&amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt;), dotted (&amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt;) or dashed (&amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt;). The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line on screen. This can be any {{STX}} colour keyword or RGB value. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line when printing. See &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; for details. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width of the function line. Possible values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The style to use to draw the function. Each function point can be plotted separately (&amp;lt;code&amp;gt;POINTS&amp;lt;/code&amp;gt;), a line can be drawn between each function point (&amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;), the area below the function can be filled with the &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;AREA&amp;lt;/code&amp;gt;), the function points can be joined by steps (&amp;lt;code&amp;gt;STEPS&amp;lt;/code&amp;gt; - note that this is only available for the &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plot) or no points are plotted (&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; - this is best used when a drawing symbol (&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;) is defined). The default style is &amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The symbol to draw at each point. This can be used in conjunction with a drawing style (see &amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;). The following keywords are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;SQUARE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TRIANGLE|CIRCLE|CROSS|DIAMOND&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The default style is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value to use for missing y values. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not specified (empty) all values are displayed, otherwise all points where &amp;lt;code&amp;gt;y=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; are not displayed. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not empty and is not a number then &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. If no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is defined, no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is used (this is the default).&lt;br /&gt;
&lt;br /&gt;
====Redraw====&lt;br /&gt;
&lt;br /&gt;
Redraw the selected graph. This is currently only implemented for the &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; REDRAW &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for details).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return 0 if successful.&lt;br /&gt;
&lt;br /&gt;
====ScaleOctave====&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Create a scale definition table for a logarithmic frequency axis with 2000 points at 10 Hz intervals and a maximum frequency of 10000 Hz.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$(xplot scaleOctave 10 2000; 10000)&#039; #xmin #xmax #xlab #x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also ScaleSteps.&lt;br /&gt;
&lt;br /&gt;
====ScaleLog10====&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleSteps&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====ScaleSteps====&lt;br /&gt;
&lt;br /&gt;
Generate a linear scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically, e.g. &#039;&amp;lt;code&amp;gt;xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;min, max&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The label distance in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the major grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between major ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the minor grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between minor ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;min max labTab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;max&amp;lt;/code&amp;gt; are is the computed or corrected scale range and &amp;lt;code&amp;gt;labTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Calculate the linear scale, grid and labels for an amplitude axis between -70 and -10 dB with labels every 10 dB, major grid lines and ticks every 5dB and minor grid lines and ticks every dB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$($#xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1)&#039; #ymin #ymax #ylab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleLog10&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Set====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; function sets the cursor mode and text attributes.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Set [ &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;|* ; ] &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xgraph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An xgraph instance on which to call the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command. If no graph is specified or an asterisk, then the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command is carried out on all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:One of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt; - turn cursors on and off and change the way they look.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xunit&amp;lt;/code&amp;gt; - the name of the x-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;yunit&amp;lt;/code&amp;gt; - the name of the y-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xtext&amp;lt;/code&amp;gt; - the description of the x-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ytext&amp;lt;/code&amp;gt; - the description of the y-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; - the graph&#039;s title&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value of &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; depends on &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;mode|* type|* line|*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Where mode is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt; - show the cursor&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; - hide the cursor&lt;br /&gt;
&lt;br /&gt;
:Where &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;vbarcross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;harmonic&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:And &amp;lt;code&amp;gt;line&amp;lt;/code&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; |&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is not &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is used as the text, unit or title.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
====SetCallback====&lt;br /&gt;
&lt;br /&gt;
The callback function is called by the message handlers to process popup and context menu messages and hotkeys which are not used by &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt;. The following commands are used to call the callback function:&lt;br /&gt;
&lt;br /&gt;
If called from an &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xgraphinstance irow icol msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If called from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xplotinstance * * msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetCallback [ &amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the callback function or an empty string to remove a previous association.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
====SetWave====&lt;br /&gt;
&lt;br /&gt;
Attach a signal to one graph or all graphs (see &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;). If a wave item is attached to a graph, it can not be deleted before it is detached or the graph or &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance is deleted.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function Graph for details). If this parameter is omitted, then the wave item is set for all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XWave : CObjEx|XWAVE]]&amp;lt;/code&amp;gt; instance (or empty to remove attachment).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
Note that wave items can only be attached to graphs of type &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt;.====XPlot Hotkeys====&lt;br /&gt;
&lt;br /&gt;
The following hotkeys are implemented in the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Turn the cursors on and off.&lt;br /&gt;
|-&lt;br /&gt;
|S&lt;br /&gt;
|Change to the next cursor style.&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Turn cursor binding on and off.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+N&lt;br /&gt;
|Bind the cursor to the next function.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+P&lt;br /&gt;
|Bind the cursor to the previous function.&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|Turn the cursor rubberline on and off.&lt;br /&gt;
|-&lt;br /&gt;
|T&lt;br /&gt;
|Turn the title on and off.&lt;br /&gt;
|-&lt;br /&gt;
|X&lt;br /&gt;
|Change to the next x&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Y&lt;br /&gt;
|Change to the next y&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Z&lt;br /&gt;
|Change to the next z&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Space&lt;br /&gt;
|Open the setup dialog.&lt;br /&gt;
|-&lt;br /&gt;
|P&lt;br /&gt;
|Play the attached wave (between the cursors).&lt;br /&gt;
|-&lt;br /&gt;
|Q&lt;br /&gt;
|Play the attached wave (the whole signal).&lt;br /&gt;
|-&lt;br /&gt;
|ESC&lt;br /&gt;
|Stop playback.&lt;br /&gt;
|-&lt;br /&gt;
|Ins&lt;br /&gt;
|Show the selected metasegment&#039;s settings in a dialog or, if no metasegment is selected, show a dialog to create a new metasegment.&lt;br /&gt;
|-&lt;br /&gt;
|Del&lt;br /&gt;
|Delete the selected metasegments.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+Left Click&lt;br /&gt;
|Move the legend to the clicked position.&lt;br /&gt;
|-&lt;br /&gt;
|Shift+Left Click&lt;br /&gt;
|Create a metasegment at the clicked position (show the &#039;Insert Metasegment&#039; dialog).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XPlot Examples====&lt;br /&gt;
&lt;br /&gt;
=====Simple XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates simple &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; usage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro xplot_example_1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display (and graph)&lt;br /&gt;
    //&lt;br /&gt;
    #xplot := xplot 2 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
    if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
    //&lt;br /&gt;
    // plot graphs (including data generation)&lt;br /&gt;
    //&lt;br /&gt;
    #nValues := 100&lt;br /&gt;
    $#xplot Plot 0 0 ; XYPLOT ; $(eval fill($#nValues,1,1)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    $#xplot Plot 1 0 ; SPECTROGRAM ; $(eval rand(1,100,100)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    // the clean up takes place automatically&lt;br /&gt;
    // when the plot window is closed&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Plot rows of a matrix using XPLOT=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates how to plot the rows of a matrix using the &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//{{3.9 6473}{2009.01.29  16.44.04} - automatically created version information - do not change or delete this line}&lt;br /&gt;
&lt;br /&gt;
[macro xplot_example_2]&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      This row demonstrates how to plot each row of a matrix&lt;br /&gt;
//&lt;br /&gt;
//      C.G. 29.1.2009&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create display (and graph)&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#xplot := xplot 1 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create a matrix and fill it with some meaningless data&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#mat := new table * /Parameter * number:X:100&lt;br /&gt;
if &#039;$#mat[?]&#039; != table em -1 ; cannot create table ($emsg)&lt;br /&gt;
&lt;br /&gt;
for #i := 0 to $#i &amp;lt; 10 step #i := int $#i + 1&lt;br /&gt;
        $#mat[$#i,*] := eval fill( 100, $#i+1, $#i+1 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// plot each row of the matrix&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
for #i := int 0 to $#i &amp;lt; $#mat[!nrow] step #i := int $#i + 1&lt;br /&gt;
        #x := eval $#mat[$#i,*]&lt;br /&gt;
        $#xplot AddPlot 0 0 ; XYPLOT ; $#x ; * ; row-by-row plot ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Advanced XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
This example not only demonstrates the use of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class, but also signal processing using the &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
//      &lt;br /&gt;
//      DSP Examples&lt;br /&gt;
//      &lt;br /&gt;
//      last update:    Nov 17, 2007 (AN)&lt;br /&gt;
//      {{STX}} version:    {{STX}} 3.8 Beta&lt;br /&gt;
//&lt;br /&gt;
//      The examples in this file demonstrates how to ...&lt;br /&gt;
//              ...     use the EVAL command for signal processing&lt;br /&gt;
//              ...     use the class XWAVE     to read a signal frame by frame&lt;br /&gt;
//              ...     display spectrograms, waveforms and functions in XPLOT graphs&lt;br /&gt;
//              ...     enable XPLOT to play signals&lt;br /&gt;
//              ...     use the XPLOT callback function to implement simple user controls&lt;br /&gt;
//              ...     set and get cursor attritbutes and positions of XPLOT graphs&lt;br /&gt;
//              ...     add a legend to a XPLOT graph&lt;br /&gt;
//              ... use BUTIL MSGBOX for simple dialogs&lt;br /&gt;
//              ...     use the CON object (class BScript) to display log. messages&lt;br /&gt;
//              ...     use the CON object to save numeric tables to textfiles&lt;br /&gt;
//              ...     simulate item messages using the message queue macro MSGQUEUE&lt;br /&gt;
//              ...     implement and call local subroutines&lt;br /&gt;
//&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExAvrSpectrum                Create a plot containing the average spectra of all segments selected&lt;br /&gt;
//                                                      in the DataSet view.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExAvrSpectrum #lfrm=100ms&#039;;&#039;#sfrm=50%&#039;;&#039;#wtyp=hamming&#039;;&#039;#ascale=dB&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming, ...)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      create the result table (one spectrum per row)&lt;br /&gt;
#asp := new table * * num:x:$#segments[] /p&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
#nok := 0       //      number of computed average spectra&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
        con log process segment &amp;quot;set=$#aset, id=$#aseg, ch=$#ach&amp;quot; ($(int $#i+1) of $#segments[])&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        //      usage: XWAVE setref ; segmentid ; channel ; mode ; framelength ; frameshift ; ampmax ; ampref&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        //      set / check sampling rate&lt;br /&gt;
        else if &#039;$#srate&#039; == &#039;&#039; then&lt;br /&gt;
                #srate := $($#wave srate)       &lt;br /&gt;
        else if $($#wave srate) != $#srate then&lt;br /&gt;
                butil &#039;msgbox msg; segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; - sampling rate mismatch; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        //      compute the average spectrum&lt;br /&gt;
        if $(#tmp := dspexlib averagespectrum $#wave ; $#wtyp ; $#ascale)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute average spectrum of segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
                &lt;br /&gt;
        $#asp[*,$#nok] := $#tmp                                 //      save the spectrum&lt;br /&gt;
        delete $#tmp                                                    //      delete temp. buffer&lt;br /&gt;
        #legend := &#039;$#legend $($#wave title);&#039;  //      add segment to legend string&lt;br /&gt;
        $#wave destroy                                                  //      delete wave object&lt;br /&gt;
        #nok := int $#nok+1                                             //      increment result vector counter&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      exit if no results are computed&lt;br /&gt;
if $#nok &amp;lt; 1 exit &lt;br /&gt;
&lt;br /&gt;
//      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
readstr &#039;$(dspexlib frequencyscale $#srate ; $#asp[!nrow] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
//      create and configure the plot object&lt;br /&gt;
//      usage: XPLOT rows ; cols0 cols1 .. ; windowtitle ; graphicprofile ; wx wy wwidth wheight&lt;br /&gt;
#plot := xplot 1; 1; Average Spectrum; Rainbow; 0 0 1024 800&lt;br /&gt;
&lt;br /&gt;
//      plot all spectra and display the legend&lt;br /&gt;
#title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; $#df&lt;br /&gt;
readstr &#039;$(dspexlib amplitudescale $#ascale)&#039; #ytext #yunit&lt;br /&gt;
//      usage: xplot PLOT row col; FUNCTION; ydata; xdata; title; xrange; xunit; xtext; yrange; yunit; yrange&lt;br /&gt;
$#plot plot 0; function; $#asp; $#frq; $#title; ; $#funit; frequency; ; $#yunit ; $#ytext&lt;br /&gt;
$#plot legend 0; %; 50; 95; 45; 5; black; color; $#legend&lt;br /&gt;
$#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
$#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
//      wait until plot window is closed &lt;br /&gt;
$#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
//      finished - cleanup and and exit&lt;br /&gt;
delete $#asp $#frq $#segments   //      delete data items&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExSpectrogram                Plot a spectrogram of all segments selected in the DataSet view.&lt;br /&gt;
//                                                      For each segment one spectrogram window is displayed. The window&lt;br /&gt;
//                                                      must be closed before the next segment is analysed.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExSpectrogram #lfrm=40ms&#039;;&#039;#sfrm=10%&#039;;&#039;#wtyp=hamming&#039;;&#039;#arange=50&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming)&lt;br /&gt;
//                              #arange         spectrogram display range in dB (max .. max-range)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode variable to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] &amp;amp;&amp;amp; &#039;$DSPExMode&#039; != &#039;&#039; step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute the spectrogram&lt;br /&gt;
        if $(#asp := dspexlib spectrogram $#wave ; $#wtyp ; log)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute spectrogram of segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
        readstr &#039;$(dspexlib frequencyscale $($#wave srate) ; $#asp[!ncol] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
        //      create and configure the plot object&lt;br /&gt;
        #plot := xplot 2; 1 1; $($#wave title)   quit = c-q, next = c-n; Rainbow; 0 0 1024 800&lt;br /&gt;
        $($#plot display) height 3 1 /apply             //      set height of graphs&lt;br /&gt;
&lt;br /&gt;
        //      plot spectrogram and waveform&lt;br /&gt;
        #title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, arange=%s, amax=%.1fdB, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; &#039;$#arange&#039; $(eval max($#asp)) $#df&lt;br /&gt;
        $#plot plot 0; spectrogram; $#asp; $#frq; $#title; $($#wave tbegin) $($#wave tend); s; time; ; $#funit; frequency; $#arange&lt;br /&gt;
        $#plot plot 1; waveform; $#wave; ; s; time; $($#wave amax); $($#wave amax); amplitude; 1&lt;br /&gt;
        $#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
        $#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
        //      assign wave object to xplot graphs (for playback)&lt;br /&gt;
        $#plot setwave $#wave &lt;br /&gt;
&lt;br /&gt;
        //      wait until plot window is closed &lt;br /&gt;
        $#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
        //      cleanup&lt;br /&gt;
        delete $#asp $#frq              //      delete data items&lt;br /&gt;
        $#wave destroy                  //      delete wave object&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      finished - cleanup and exit&lt;br /&gt;
delete $#segments       //      delete segment table&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExCallback                   Callback function for XPLOT.&lt;br /&gt;
//&lt;br /&gt;
//      arguments:&lt;br /&gt;
//              if called from xplotobject message handler      -&amp;gt;   &#039;CALLBACK xplotobject * * msgid msgpar&#039;                   &lt;br /&gt;
//              if called from xgraphobject message handler     -&amp;gt;   &#039;CALLBACK xgraphobject row col msgid msgpar&#039;&lt;br /&gt;
//&lt;br /&gt;
//      Note: This macro uses the shell variable DSPEXMODE to check which macro has installed the &lt;br /&gt;
//      callback and to set return values.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExCallback #obj #row #col #msgid #msgpar]&lt;br /&gt;
&lt;br /&gt;
//      get xplot-object if called from a xgraph-object&lt;br /&gt;
if &#039;$#obj[!class]&#039; == xgraph #obj := $#obj get xplot&lt;br /&gt;
&lt;br /&gt;
//      message filter for keystroke messages&lt;br /&gt;
&lt;br /&gt;
//      process Control-Q (QUIT) key&lt;br /&gt;
if &#039;$#msgid$#msgpar&#039; == keyCQ then&lt;br /&gt;
&lt;br /&gt;
        if $(butil msgbox yesno; Quit ?; $DSPExMode) == yes then&lt;br /&gt;
                //      place the display-close message in the message queue to end the xplot message loop&lt;br /&gt;
                msgqueue &#039;display $($#obj display) close&#039;&lt;br /&gt;
                //      set mode variable to empty-string if C-Q key was pressed&lt;br /&gt;
                DSPExMode := &#039;&#039;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-C (COPY) and Control-S (SAVE) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCC keyCS) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0 (later used to retrieve data)&lt;br /&gt;
        #obj := $#obj graph 0; instance&lt;br /&gt;
&lt;br /&gt;
        //      select the data to be saved and the save format&lt;br /&gt;
        #todo := butil msgbox userdefined Amp Frq+Amp Cancel;; $DSPExMode - $(word $#i &#039;Copy to Clipboard&#039; &#039;Save to CSV-File&#039;) &lt;br /&gt;
        if $#todo == Amp then&lt;br /&gt;
                #table := eval $($#obj get ydata)       //      use eval to get a copy of y-data&lt;br /&gt;
        else if $#todo == Frq+Amp then&lt;br /&gt;
                if &#039;$DSPExMode&#039; == DSPExAvrSpectrum then&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , $($#obj get ydata) ) // merge x- and y-data into one table&lt;br /&gt;
                else&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , trn($($#obj get ydata)) ) // merge x- and transposed y-data into one table&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      copy / save if table exists&lt;br /&gt;
        if $#table[?] == table then&lt;br /&gt;
                //      select target&lt;br /&gt;
                if $#i == 0 then&lt;br /&gt;
                        #file := set clipboard  // set target to &amp;quot;clipboard&amp;quot; for all copy_xxx functions&lt;br /&gt;
                else&lt;br /&gt;
                        #file := butil filedialog save; Select Output File; ; CSV=CSV-File; TXT=Textfile        //      use filedialog to select the output file&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
                //      use the CON-object to copy/save table&lt;br /&gt;
                if &#039;$#file&#039; != &#039;&#039; con savedata text; $#table; $#file; 0; comma; dot&lt;br /&gt;
                delete $#table&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-I (INFO) || Control-M (MAX-MEAN) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCI keyCM) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0&lt;br /&gt;
        #obj := $#obj graph 0;inst&lt;br /&gt;
&lt;br /&gt;
        //      save original graph title&lt;br /&gt;
        if &#039;$GraphTitle&#039; == &#039;&#039; GraphTitle := $#obj get title&lt;br /&gt;
&lt;br /&gt;
        if $#i == 0 then&lt;br /&gt;
                //      get and display cursor positions&lt;br /&gt;
                readstr &#039;$($#obj get cursorposition)&#039; #i1 #x1 #y1 #i2 #x2 #y2 #&lt;br /&gt;
                #text := format &#039;Index = %d .. %d,  X = %g ... %g (%g),  Y = %g ... %g (%g)&#039; $#i1 $#i2 $#x1 $#x2 abs($#x1-$#x2) $#y1 $#y2 abs($#y1-$#y2)&lt;br /&gt;
        else&lt;br /&gt;
                //      set cursor mode (on), style (crosshair), rubberline (off), bind-mode (off), bind-functionindex (0)&lt;br /&gt;
                $#obj set cursormode on crosshair off off 0&lt;br /&gt;
                //      get x- and y-data&lt;br /&gt;
                #x := $#obj get xdata&lt;br /&gt;
                #y := $#obj get ydata&lt;br /&gt;
                //      find index of maximum y value &lt;br /&gt;
                #imax := eval imax($#y[*,0])&lt;br /&gt;
                //      compute mean of x and y&lt;br /&gt;
                #xavr := eval avr($#x)&lt;br /&gt;
                #yavr := eval avr($#y)&lt;br /&gt;
                //      set cursor 1 to maximum and cursor 2 to mean&lt;br /&gt;
                $#obj set cursorpos 1 $#x[$#imax] $#y[$#imax] deselect&lt;br /&gt;
                $#obj set cursorpos 2 $#xavr $#yavr deselect&lt;br /&gt;
                //      show maximum and mean in xgraph title&lt;br /&gt;
                #text := format &#039;Maximum( %g , %g ), Average( %g , %g )&#039; $#x[$#imax] $#y[$#imax] $#xavr $#yavr&lt;br /&gt;
        end&lt;br /&gt;
        //      show info in graph title&lt;br /&gt;
        $#obj set title $GraphTitle -- $#text&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      note: the return value of the callback function is not used by the xplot/xgraph message handler&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExLib                        Implements a set of signal processing functions which can be called with&lt;br /&gt;
//                                              &amp;quot;DSPLIBEXAMPLE functionname functionarguments&amp;quot;. This call style is often&lt;br /&gt;
//                                              used to reduce the number of macros of a script or application.&lt;br /&gt;
//&lt;br /&gt;
//      Functions:&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB GETSEGMENTS&lt;br /&gt;
//                      result: a list of all segments selected in the DataSet view stored in a simple&lt;br /&gt;
//                                      table (per line: &#039;setReference ; segmentId ; channelIndex&#039;)&lt;br /&gt;
//                      note:   this function shows an error message and terminates the caller if no segments&lt;br /&gt;
//                                      are selected&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AVERAGESPECTRUM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: an averaged fft spectrum in the selected format&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB SPECTROGRAM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                                                                                                      or COMPLEX&lt;br /&gt;
//                      result: a matrix of fft spectra in the selected format, one spectrum per line&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB FREQUENCYSCALE sr ; n ; type&lt;br /&gt;
//                      sr                      sampling rate in Hz&lt;br /&gt;
//                      n                       number of spectrum bins (equally spaced in the Hz domain)&lt;br /&gt;
//                      type            type of frequency scale:        HZ, KHZ, BARK, MEL, ERB&lt;br /&gt;
//                      result: &#039;frq unit df&#039;; frq is the frequency scale vector, unit is the frequency unit&lt;br /&gt;
//                                      name and df is the frequency scale step in Hz&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AMPLITUDESCALE type&lt;br /&gt;
//                      type            type of amplitude scale:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: &#039;name unit df&#039;; name and unit of amplitude scale&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExLib]&lt;br /&gt;
&lt;br /&gt;
//      function call dispatching&lt;br /&gt;
readvar #argv #fun #argv /d&lt;br /&gt;
goto fun$#fun noFun&lt;br /&gt;
&lt;br /&gt;
noFun:&lt;br /&gt;
//      function not implemented&lt;br /&gt;
//      result: empty string&lt;br /&gt;
&lt;br /&gt;
        //      show an error message and exit&lt;br /&gt;
        con log &#039;$#mac function &amp;quot;$#fun&amp;quot; not implemented&#039; &lt;br /&gt;
        exit 1 set &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funGetSegments: //      in:&lt;br /&gt;
                                //      out:    segment_list_table&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      retrieve list of selected segments from the DataSet application&lt;br /&gt;
        #segments := datasetcmd getselected segments&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table &amp;amp;&amp;amp; &#039;$#segments[]&#039; &amp;gt; 0 exit 1 set $#segments&lt;br /&gt;
        butil msgbox msg ; no segments selected - select and try again; Error!&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table delete $#segments&lt;br /&gt;
        exit 2 set &#039;&#039;   //      terminate this and the calling macro!&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAverageSpectrum:     //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                        //      out:    averagespectrum_vector&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      create result table &lt;br /&gt;
        #spg := new table * &lt;br /&gt;
&lt;br /&gt;
        //      compute averaged amplitude spectrum&lt;br /&gt;
        #n := $($#wave framecount)&lt;br /&gt;
        $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
        for #i := 1 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) ) + $#spg&lt;br /&gt;
        end&lt;br /&gt;
        $#spg := eval $#spg / $#n&lt;br /&gt;
&lt;br /&gt;
        //      convert to selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
        else if $#atyp == 2 then &lt;br /&gt;
                $#spg := eval $#spg ?^ 2&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return averaged spectrum&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funSpectrogram: //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                //      out:    spectrogram_matrix&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      check selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#wtyp&#039; dB logarithmic power amplitude linear complex) &amp;lt; 5 then&lt;br /&gt;
                //      compute amplitude or power spectra&lt;br /&gt;
        &lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength)/2 + 1) /p&lt;br /&gt;
                //      compute amplitude spectra&lt;br /&gt;
                #n := $($#wave framecount)&lt;br /&gt;
                for #i := 0 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                        if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
                end&lt;br /&gt;
                //      convert to selected output spectrum type&lt;br /&gt;
                if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                        $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
                else if $#atyp == 2 then &lt;br /&gt;
                        $#spg := eval $#spg ?^ 2&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        else&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
&lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength) + 2) /p&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
                for #i := int $($#wave framecount) to $#i &amp;gt; 0 step #i := int $#i-1&lt;br /&gt;
                        if $#i%50 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval fft ( $($#wave read) ?* $#w )&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return spectrogram matrix&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funFrequencyScale:      //      in:             samplingrate ; spectrumbins ; frequencyscale &lt;br /&gt;
                                        //      out:    frequencyscale_vector frequencyscale_unit frequency_resolution_Hz&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #sr&#039;;&#039;#n&#039;;&#039;#unit&#039;;&#039;#&lt;br /&gt;
        //      generate frequency scale equally spaced in Hz&lt;br /&gt;
        #frq := new table * // dummy table to make frq-scale permanent&lt;br /&gt;
        $#frq := eval fill($#n, 0, $(#df := eval $#sr / 2 / ($#n - 1)) )&lt;br /&gt;
        //      convert to selected scale&lt;br /&gt;
        if $(#unit := keyword &#039;$#unit&#039; Hz kHz Bark Mel ERB) &amp;lt; 0 #unit := 0&lt;br /&gt;
        if $(#unit := word $#unit Hz kHz Bark Mel ERB) == kHz then&lt;br /&gt;
                $#frq := eval $#frq / 1000&lt;br /&gt;
        else if $#unit != Hz then&lt;br /&gt;
                $#frq := eval hz2$#unit($#frq)&lt;br /&gt;
        end&lt;br /&gt;
        //      return scale settings&lt;br /&gt;
        exit 1 set &#039;$#frq $#unit $#df&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAmplitudeScale:      //      in:             amplitudescale &lt;br /&gt;
                                        //      out:    amplitudescale_text amplitudescale_unit&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #unit&#039;;&#039;#&lt;br /&gt;
        //      get text and unit of amplitude scale&lt;br /&gt;
        if $(#i := keyword &#039;$#unit&#039; dB logarithmic power amplitude linear) &amp;lt; 2 #i := 0&lt;br /&gt;
        #unit := word $#i dB dB - - -&lt;br /&gt;
        #text := word $#i amplitude amplitude power amplitude amplitude&lt;br /&gt;
        exit 1 set &#039;$#text $#unit&#039;&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      local subroutines&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
makeWindow:&lt;br /&gt;
        //      GOSUB MAKEWINDOW windowlength windowtype -&amp;gt; windowvector&lt;br /&gt;
        readvar #argv #wlen #wtyp # &lt;br /&gt;
        #list := hanning hamming blackman kaiser bartlett taprect nuttall flattop gauss&lt;br /&gt;
        if $(#wtyp := keyword &#039;$#wtyp&#039; $#list) &amp;lt; 0 #wtyp := 0 &lt;br /&gt;
        exit 1 eval window($#wtyp, $#wlen, 1) * 2 / $#wlen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7123</id>
		<title>Programmer Guide/Macro Library/XPlot</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7123"/>
		<updated>2014-05-20T13:24:52Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
&lt;br /&gt;
==XPlot : CObjEx==&lt;br /&gt;
&lt;br /&gt;
A general class for plotting multiple graphs.&lt;br /&gt;
&lt;br /&gt;
===XPlot Construction===&lt;br /&gt;
&lt;br /&gt;
Initialize a new XPlot-instance to display 1 or more graphs. Returns the new object or an empty string. Information and error messages are written to the &amp;lt;code&amp;gt;BSCRIPT CON&amp;lt;/code&amp;gt; console.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XPlot &amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of rows (default=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of columns for each row (inrow0 inrow1 ...). The default is one column per row.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The display window title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the graphics profile to use. A graphics profile is also known as a colour scheme.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The window position and size (in the format &#039;&amp;lt;code&amp;gt;x y width height&amp;lt;/code&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of an existing display item which should own this new window. See &amp;lt;code&amp;gt;NEW DISPLAY&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
A new &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; object if successful or an empty string.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; instance with one graph is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := xplot&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; Failed to create the xplot instance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===XPlot Member Functions===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class has the following member functions. See CObjEx Member Functions for a list of functions implemented in the parent class.&lt;br /&gt;
&lt;br /&gt;
====AddPlot====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; is identical to the &amp;lt;code&amp;gt;PLOT&amp;lt;/code&amp;gt; function, except that it adds to an existing graph (in addition to or on top of the original plot). If no graph exists at the specified &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;, then the call is passed to &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;. It supports the following plot types: &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;. The parameters are identical to the &amp;lt;code&amp;gt;[[#Plot|PLOT]]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
====Dialog====&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;Dialog&amp;lt;/code&amp;gt; can be used to show and hide a dialog in the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; display.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog &amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The ID of the current or new dialog item or an empty string.&lt;br /&gt;
&lt;br /&gt;
====New====&lt;br /&gt;
&lt;br /&gt;
Creates a new dialog item (deleting the old one first).&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog New&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Delete======&lt;br /&gt;
&lt;br /&gt;
Removes the dialog from the display and deletes the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Msg======&lt;br /&gt;
&lt;br /&gt;
Posts a message to the macro message queue. The format of the message is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgId&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgPar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when the display is closed, this function is called to post the message &amp;lt;code&amp;gt;MENU dialogItem CLOSE&amp;lt;/code&amp;gt; to the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Msg ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message ID.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message parameters.&lt;br /&gt;
&lt;br /&gt;
======On|Enabled======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog On; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Enabled; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Off|Hidden======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Off ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Hidden ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Display====&lt;br /&gt;
&lt;br /&gt;
Returns the ID of the display object associated with this &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; display&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns the display object of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
====End====&lt;br /&gt;
&lt;br /&gt;
Enters the message loop, waits until the user closes the plot display and then destroys itself.&lt;br /&gt;
&lt;br /&gt;
====Get====&lt;br /&gt;
&lt;br /&gt;
Retrieve an attribute from a specific graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Get &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of the requested attribute. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;CURSORPOSITION&amp;lt;/code&amp;gt; - Returns the current cursor positions in the following format: &amp;lt;code&amp;gt;i1 x1 y1 i2 x2 y2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that &amp;lt;code&amp;gt;x1 &amp;lt;= x2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;YDATA&amp;lt;/code&amp;gt; - Returns the y data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;XDATA&amp;lt;/code&amp;gt; - Returns the x data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;RANGE&amp;lt;/code&amp;gt; - Returns the x axis and y axis range in the following format: &amp;lt;code&amp;gt;xmin xmax ymin ymax&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; - Returns the plot type (see &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; for a list of available plot types).&lt;br /&gt;
&lt;br /&gt;
====GetFColors====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GetFColors&amp;lt;/code&amp;gt; function returns a blank separated list of the function colors defined in the selected graphics profile.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; GetFColors&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns a blank separated list of color keywords.&lt;br /&gt;
&lt;br /&gt;
====Graph====&lt;br /&gt;
&lt;br /&gt;
Returns the requested attribute &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; of the graph identified by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Graph &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; [; &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;=GRAPH ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of a graph item, an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XGraph : CObjEx|XGRAPH]]&amp;lt;/code&amp;gt; instance or the &#039;&amp;lt;code&amp;gt;row column&amp;lt;/code&amp;gt;&#039; address of a splitter in the display. Note that the &amp;lt;code&amp;gt;row&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;column&amp;lt;/code&amp;gt; indices are zero-based.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The attribute to returned. The following values are allowed:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;INSTANCE&amp;lt;/code&amp;gt; - Return the id of the &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; instance associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GRAPH&amp;lt;/code&amp;gt; - Return the id of the graph object associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. This is the default attribute.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ROW&amp;lt;/code&amp;gt; - Return the row index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;COLUMN&amp;lt;/code&amp;gt; - Return the column index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return values are selected by the argument &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;. See the description of &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; for details. If the address argument &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; do not refer to a graph, &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; or splitter of the display, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Get the graph item id for the top left graph.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#graph := $#xplot graph 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====Legend====&lt;br /&gt;
&lt;br /&gt;
Display a graph legend. Use &amp;lt;code&amp;gt;$#xplot LEGEND $#graph&amp;lt;/code&amp;gt; to clear the legend.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Legend &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;w&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;h&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text1&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text2&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph address (e.g. row and column index. See [[#Plot|PLOT]] for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit for size and position values. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt; - The real x/y values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;percent&amp;lt;/code&amp;gt; - The percent of the graph&#039;s plot area.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x, y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The position of the upper right corner of the first legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;w, h&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width and height of one legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The legend text color.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This flag selects the line attributes to be displayed. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt; - The color.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; - The color, style, width and symbol.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text for the legend for function X. If no text is supplied, the legend line is removed.This parameter can be either a string, or a simple table.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
void&lt;br /&gt;
&lt;br /&gt;
====Plot====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; can be used to plot a function in a graph. Currently, {{STX}} supports waveform , x/y (aka function and more specifically parameter), spectrogram and waterfall plots.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Plot an x/y function graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see the member function [[#Graph|GRAPH]] for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis data (a vector or an array).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data to be used for the x axis. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:A data vector with &amp;lt;code&amp;gt;y[!nrow]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. This is the default and means that the x axis uses the values &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:A blank separated list of values (&#039;x1 x2&#039; -&amp;gt; x[i] = x1+(x2-x1)/(y[!nrow]-1), i = 0..&amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be displayed in this plot.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The x axis display range. This can be one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xmin xmax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the x axis unit (e.g. &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;). The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt; plot only allows the following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the x axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ymin ymax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the y axis unit (e.g. &amp;lt;code&amp;gt;dB&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the y axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; argument (see &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; for details) or a zero-based function line index as specified in a color scheme (see Color Schemes in the User Guide).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xlabtab, ylabtab, zlabtab&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Extended tables containing the scale, grid and label definitions. For a description of the table format, please see the scale definition table for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Plot a simple x/y function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := XPLOT 1 ; 1 ; XPLOT ; Default ; 0 0 400 400&lt;br /&gt;
$#xplot plot 0 ; XYPLOT; $(eval fill(10, 0, 1)) ; * ; xyplot ; * ; ; x-axis ; * ; ; y-axis&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Plot a function graph. Note that this is identical to an &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y ; x ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter descriptions.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======parameter======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter graph. A parameter graph differs from a function graph because a parameter plot can have missing values - it does not necessarily have values for every point on the x axis.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; parameter ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======spectrogram======&lt;br /&gt;
&lt;br /&gt;
Plot a spectrogram graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; spectrogram ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A data array containing one spectrum or function line per &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; row. Note that this parameter is specific to the &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WATERFALL&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y-scale data (frequency). This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:1) &amp;lt;code&amp;gt;vData&amp;lt;/code&amp;gt; - A data vector with &amp;lt;code&amp;gt;y[!ncol]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:2) * - An asterisk: &amp;lt;code&amp;gt;y[i] = i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;. This is the default.&lt;br /&gt;
&lt;br /&gt;
:3) &amp;lt;code&amp;gt;y1 y2&amp;lt;/code&amp;gt; - Two blank separated values: &amp;lt;code&amp;gt;y[i] = y1+i*(y2-y1)/(d[!ncol]-1)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z scale is a color scale. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zdown&amp;lt;/code&amp;gt; - A numerical value. The maximum z value is chosen automatically and the minimum value is calculated as follows: &amp;lt;code&amp;gt;zmax-zdown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WATERFALL======&lt;br /&gt;
&lt;br /&gt;
Plot a waterfall graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WATERFALL ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zlabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data array (one spectrum or function-line / row).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z axis display range. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the z axis unit (e.g. &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the z axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the x scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the y scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of lines to be plotted. The default is &amp;lt;code&amp;gt;150&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WAVEFORM======&lt;br /&gt;
&lt;br /&gt;
Plot a waveform graph. Note that the displayed wave item is automatically attached to the graph. This means, no explicit call to &amp;lt;code&amp;gt;SetWave&amp;lt;/code&amp;gt; is necessary.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WAVEFORM ; &amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;XWAVE&amp;lt;/code&amp;gt; instance&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit to use on the x axis. The following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum waveform amplitude. This can be a value between 0 and ...&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be any positive number. The default is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the waveform envelope should be filled or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======TEXTBOX======&lt;br /&gt;
&lt;br /&gt;
Plot a graph containing text.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; TEXTBOX ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text color. This can be an of the {{STX}} color arguments.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The horizontal text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The vertical text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TOP&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BOTTOM&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text to be displayed. This can be a simple table with an entry per line of text or a semi-colon separated list of text lines.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======fstyle======&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;fstyle&amp;lt;/var&amp;gt; argument passed to the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; functions &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; has the following syntax and components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Determines whether the function line is solid (&amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt;), dotted (&amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt;) or dashed (&amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt;). The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line on screen. This can be any {{STX}} colour keyword or RGB value. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line when printing. See &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; for details. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width of the function line. Possible values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The style to use to draw the function. Each function point can be plotted separately (&amp;lt;code&amp;gt;POINTS&amp;lt;/code&amp;gt;), a line can be drawn between each function point (&amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;), the area below the function can be filled with the &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;AREA&amp;lt;/code&amp;gt;), the function points can be joined by steps (&amp;lt;code&amp;gt;STEPS&amp;lt;/code&amp;gt; - note that this is only available for the &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plot) or no points are plotted (&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; - this is best used when a drawing symbol (&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;) is defined). The default style is &amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The symbol to draw at each point. This can be used in conjunction with a drawing style (see &amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;). The following keywords are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;SQUARE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TRIANGLE|CIRCLE|CROSS|DIAMOND&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The default style is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value to use for missing y values. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not specified (empty) all values are displayed, otherwise all points where &amp;lt;code&amp;gt;y=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; are not displayed. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not empty and is not a number then &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. If no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is defined, no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is used (this is the default).&lt;br /&gt;
&lt;br /&gt;
====Redraw====&lt;br /&gt;
&lt;br /&gt;
Redraw the selected graph. This is currently only implemented for the &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; REDRAW &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for details).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return 0 if successful.&lt;br /&gt;
&lt;br /&gt;
====ScaleOctave====&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Create a scale definition table for a logarithmic frequency axis with 2000 points at 10 Hz intervals and a maximum frequency of 10000 Hz.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$(xplot scaleOctave 10 2000; 10000)&#039; #xmin #xmax #xlab #x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also ScaleSteps.&lt;br /&gt;
&lt;br /&gt;
====ScaleLog10====&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleSteps&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====ScaleSteps====&lt;br /&gt;
&lt;br /&gt;
Generate a linear scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically, e.g. &#039;&amp;lt;code&amp;gt;xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;min, max&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The label distance in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the major grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between major ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the minor grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between minor ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;min max labTab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;max&amp;lt;/code&amp;gt; are is the computed or corrected scale range and &amp;lt;code&amp;gt;labTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Calculate the linear scale, grid and labels for an amplitude axis between -70 and -10 dB with labels every 10 dB, major grid lines and ticks every 5dB and minor grid lines and ticks every dB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$($#xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1)&#039; #ymin #ymax #ylab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleLog10&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
====Set====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; function sets the cursor mode and text attributes.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Set [ &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;|* ; ] &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xgraph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An xgraph instance on which to call the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command. If no graph is specified or an asterisk, then the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command is carried out on all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:One of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt; - turn cursors on and off and change the way they look.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xunit&amp;lt;/code&amp;gt; - the name of the x-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;yunit&amp;lt;/code&amp;gt; - the name of the y-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xtext&amp;lt;/code&amp;gt; - the description of the x-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ytext&amp;lt;/code&amp;gt; - the description of the y-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; - the graph&#039;s title&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value of &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; depends on &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;mode|* type|* line|*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Where mode is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt; - show the cursor&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; - hide the cursor&lt;br /&gt;
&lt;br /&gt;
:Where &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;vbarcross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;harmonic&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:And &amp;lt;code&amp;gt;line&amp;lt;/code&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; |&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is not &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is used as the text, unit or title.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
====SetCallback====&lt;br /&gt;
&lt;br /&gt;
The callback function is called by the message handlers to process popup and context menu messages and hotkeys which are not used by &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt;. The following commands are used to call the callback function:&lt;br /&gt;
&lt;br /&gt;
If called from an &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xgraphinstance irow icol msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If called from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xplotinstance * * msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetCallback [ &amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the callback function or an empty string to remove a previous association.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
====SetWave====&lt;br /&gt;
&lt;br /&gt;
Attach a signal to one graph or all graphs (see &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;). If a wave item is attached to a graph, it can not be deleted before it is detached or the graph or &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance is deleted.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function Graph for details). If this parameter is omitted, then the wave item is set for all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XWave : CObjEx|XWAVE]]&amp;lt;/code&amp;gt; instance (or empty to remove attachment).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
Note that wave items can only be attached to graphs of type &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt;.====XPlot Hotkeys====&lt;br /&gt;
&lt;br /&gt;
The following hotkeys are implemented in the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Turn the cursors on and off.&lt;br /&gt;
|-&lt;br /&gt;
|S&lt;br /&gt;
|Change to the next cursor style.&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Turn cursor binding on and off.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+N&lt;br /&gt;
|Bind the cursor to the next function.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+P&lt;br /&gt;
|Bind the cursor to the previous function.&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|Turn the cursor rubberline on and off.&lt;br /&gt;
|-&lt;br /&gt;
|T&lt;br /&gt;
|Turn the title on and off.&lt;br /&gt;
|-&lt;br /&gt;
|X&lt;br /&gt;
|Change to the next x&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Y&lt;br /&gt;
|Change to the next y&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Z&lt;br /&gt;
|Change to the next z&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Space&lt;br /&gt;
|Open the setup dialog.&lt;br /&gt;
|-&lt;br /&gt;
|P&lt;br /&gt;
|Play the attached wave (between the cursors).&lt;br /&gt;
|-&lt;br /&gt;
|Q&lt;br /&gt;
|Play the attached wave (the whole signal).&lt;br /&gt;
|-&lt;br /&gt;
|ESC&lt;br /&gt;
|Stop playback.&lt;br /&gt;
|-&lt;br /&gt;
|Ins&lt;br /&gt;
|Show the selected metasegment&#039;s settings in a dialog or, if no metasegment is selected, show a dialog to create a new metasegment.&lt;br /&gt;
|-&lt;br /&gt;
|Del&lt;br /&gt;
|Delete the selected metasegments.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+Left Click&lt;br /&gt;
|Move the legend to the clicked position.&lt;br /&gt;
|-&lt;br /&gt;
|Shift+Left Click&lt;br /&gt;
|Create a metasegment at the clicked position (show the &#039;Insert Metasegment&#039; dialog).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XPlot Examples====&lt;br /&gt;
&lt;br /&gt;
=====Simple XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates simple &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; usage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro xplot_example_1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display (and graph)&lt;br /&gt;
    //&lt;br /&gt;
    #xplot := xplot 2 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
    if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
    //&lt;br /&gt;
    // plot graphs (including data generation)&lt;br /&gt;
    //&lt;br /&gt;
    #nValues := 100&lt;br /&gt;
    $#xplot Plot 0 0 ; XYPLOT ; $(eval fill($#nValues,1,1)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    $#xplot Plot 1 0 ; SPECTROGRAM ; $(eval rand(1,100,100)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    // the clean up takes place automatically&lt;br /&gt;
    // when the plot window is closed&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Plot rows of a matrix using XPLOT=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates how to plot the rows of a matrix using the &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//{{3.9 6473}{2009.01.29  16.44.04} - automatically created version information - do not change or delete this line}&lt;br /&gt;
&lt;br /&gt;
[macro xplot_example_2]&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      This row demonstrates how to plot each row of a matrix&lt;br /&gt;
//&lt;br /&gt;
//      C.G. 29.1.2009&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create display (and graph)&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#xplot := xplot 1 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create a matrix and fill it with some meaningless data&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#mat := new table * /Parameter * number:X:100&lt;br /&gt;
if &#039;$#mat[?]&#039; != table em -1 ; cannot create table ($emsg)&lt;br /&gt;
&lt;br /&gt;
for #i := 0 to $#i &amp;lt; 10 step #i := int $#i + 1&lt;br /&gt;
        $#mat[$#i,*] := eval fill( 100, $#i+1, $#i+1 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// plot each row of the matrix&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
for #i := int 0 to $#i &amp;lt; $#mat[!nrow] step #i := int $#i + 1&lt;br /&gt;
        #x := eval $#mat[$#i,*]&lt;br /&gt;
        $#xplot AddPlot 0 0 ; XYPLOT ; $#x ; * ; row-by-row plot ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Advanced XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
This example not only demonstrates the use of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class, but also signal processing using the &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
//      &lt;br /&gt;
//      DSP Examples&lt;br /&gt;
//      &lt;br /&gt;
//      last update:    Nov 17, 2007 (AN)&lt;br /&gt;
//      {{STX}} version:    {{STX}} 3.8 Beta&lt;br /&gt;
//&lt;br /&gt;
//      The examples in this file demonstrates how to ...&lt;br /&gt;
//              ...     use the EVAL command for signal processing&lt;br /&gt;
//              ...     use the class XWAVE     to read a signal frame by frame&lt;br /&gt;
//              ...     display spectrograms, waveforms and functions in XPLOT graphs&lt;br /&gt;
//              ...     enable XPLOT to play signals&lt;br /&gt;
//              ...     use the XPLOT callback function to implement simple user controls&lt;br /&gt;
//              ...     set and get cursor attritbutes and positions of XPLOT graphs&lt;br /&gt;
//              ...     add a legend to a XPLOT graph&lt;br /&gt;
//              ... use BUTIL MSGBOX for simple dialogs&lt;br /&gt;
//              ...     use the CON object (class BScript) to display log. messages&lt;br /&gt;
//              ...     use the CON object to save numeric tables to textfiles&lt;br /&gt;
//              ...     simulate item messages using the message queue macro MSGQUEUE&lt;br /&gt;
//              ...     implement and call local subroutines&lt;br /&gt;
//&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExAvrSpectrum                Create a plot containing the average spectra of all segments selected&lt;br /&gt;
//                                                      in the DataSet view.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExAvrSpectrum #lfrm=100ms&#039;;&#039;#sfrm=50%&#039;;&#039;#wtyp=hamming&#039;;&#039;#ascale=dB&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming, ...)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      create the result table (one spectrum per row)&lt;br /&gt;
#asp := new table * * num:x:$#segments[] /p&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
#nok := 0       //      number of computed average spectra&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
        con log process segment &amp;quot;set=$#aset, id=$#aseg, ch=$#ach&amp;quot; ($(int $#i+1) of $#segments[])&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        //      usage: XWAVE setref ; segmentid ; channel ; mode ; framelength ; frameshift ; ampmax ; ampref&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        //      set / check sampling rate&lt;br /&gt;
        else if &#039;$#srate&#039; == &#039;&#039; then&lt;br /&gt;
                #srate := $($#wave srate)       &lt;br /&gt;
        else if $($#wave srate) != $#srate then&lt;br /&gt;
                butil &#039;msgbox msg; segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; - sampling rate mismatch; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        //      compute the average spectrum&lt;br /&gt;
        if $(#tmp := dspexlib averagespectrum $#wave ; $#wtyp ; $#ascale)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute average spectrum of segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
                &lt;br /&gt;
        $#asp[*,$#nok] := $#tmp                                 //      save the spectrum&lt;br /&gt;
        delete $#tmp                                                    //      delete temp. buffer&lt;br /&gt;
        #legend := &#039;$#legend $($#wave title);&#039;  //      add segment to legend string&lt;br /&gt;
        $#wave destroy                                                  //      delete wave object&lt;br /&gt;
        #nok := int $#nok+1                                             //      increment result vector counter&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      exit if no results are computed&lt;br /&gt;
if $#nok &amp;lt; 1 exit &lt;br /&gt;
&lt;br /&gt;
//      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
readstr &#039;$(dspexlib frequencyscale $#srate ; $#asp[!nrow] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
//      create and configure the plot object&lt;br /&gt;
//      usage: XPLOT rows ; cols0 cols1 .. ; windowtitle ; graphicprofile ; wx wy wwidth wheight&lt;br /&gt;
#plot := xplot 1; 1; Average Spectrum; Rainbow; 0 0 1024 800&lt;br /&gt;
&lt;br /&gt;
//      plot all spectra and display the legend&lt;br /&gt;
#title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; $#df&lt;br /&gt;
readstr &#039;$(dspexlib amplitudescale $#ascale)&#039; #ytext #yunit&lt;br /&gt;
//      usage: xplot PLOT row col; FUNCTION; ydata; xdata; title; xrange; xunit; xtext; yrange; yunit; yrange&lt;br /&gt;
$#plot plot 0; function; $#asp; $#frq; $#title; ; $#funit; frequency; ; $#yunit ; $#ytext&lt;br /&gt;
$#plot legend 0; %; 50; 95; 45; 5; black; color; $#legend&lt;br /&gt;
$#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
$#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
//      wait until plot window is closed &lt;br /&gt;
$#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
//      finished - cleanup and and exit&lt;br /&gt;
delete $#asp $#frq $#segments   //      delete data items&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExSpectrogram                Plot a spectrogram of all segments selected in the DataSet view.&lt;br /&gt;
//                                                      For each segment one spectrogram window is displayed. The window&lt;br /&gt;
//                                                      must be closed before the next segment is analysed.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExSpectrogram #lfrm=40ms&#039;;&#039;#sfrm=10%&#039;;&#039;#wtyp=hamming&#039;;&#039;#arange=50&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming)&lt;br /&gt;
//                              #arange         spectrogram display range in dB (max .. max-range)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode variable to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] &amp;amp;&amp;amp; &#039;$DSPExMode&#039; != &#039;&#039; step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute the spectrogram&lt;br /&gt;
        if $(#asp := dspexlib spectrogram $#wave ; $#wtyp ; log)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute spectrogram of segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
        readstr &#039;$(dspexlib frequencyscale $($#wave srate) ; $#asp[!ncol] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
        //      create and configure the plot object&lt;br /&gt;
        #plot := xplot 2; 1 1; $($#wave title)   quit = c-q, next = c-n; Rainbow; 0 0 1024 800&lt;br /&gt;
        $($#plot display) height 3 1 /apply             //      set height of graphs&lt;br /&gt;
&lt;br /&gt;
        //      plot spectrogram and waveform&lt;br /&gt;
        #title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, arange=%s, amax=%.1fdB, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; &#039;$#arange&#039; $(eval max($#asp)) $#df&lt;br /&gt;
        $#plot plot 0; spectrogram; $#asp; $#frq; $#title; $($#wave tbegin) $($#wave tend); s; time; ; $#funit; frequency; $#arange&lt;br /&gt;
        $#plot plot 1; waveform; $#wave; ; s; time; $($#wave amax); $($#wave amax); amplitude; 1&lt;br /&gt;
        $#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
        $#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
        //      assign wave object to xplot graphs (for playback)&lt;br /&gt;
        $#plot setwave $#wave &lt;br /&gt;
&lt;br /&gt;
        //      wait until plot window is closed &lt;br /&gt;
        $#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
        //      cleanup&lt;br /&gt;
        delete $#asp $#frq              //      delete data items&lt;br /&gt;
        $#wave destroy                  //      delete wave object&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      finished - cleanup and exit&lt;br /&gt;
delete $#segments       //      delete segment table&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExCallback                   Callback function for XPLOT.&lt;br /&gt;
//&lt;br /&gt;
//      arguments:&lt;br /&gt;
//              if called from xplotobject message handler      -&amp;gt;   &#039;CALLBACK xplotobject * * msgid msgpar&#039;                   &lt;br /&gt;
//              if called from xgraphobject message handler     -&amp;gt;   &#039;CALLBACK xgraphobject row col msgid msgpar&#039;&lt;br /&gt;
//&lt;br /&gt;
//      Note: This macro uses the shell variable DSPEXMODE to check which macro has installed the &lt;br /&gt;
//      callback and to set return values.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExCallback #obj #row #col #msgid #msgpar]&lt;br /&gt;
&lt;br /&gt;
//      get xplot-object if called from a xgraph-object&lt;br /&gt;
if &#039;$#obj[!class]&#039; == xgraph #obj := $#obj get xplot&lt;br /&gt;
&lt;br /&gt;
//      message filter for keystroke messages&lt;br /&gt;
&lt;br /&gt;
//      process Control-Q (QUIT) key&lt;br /&gt;
if &#039;$#msgid$#msgpar&#039; == keyCQ then&lt;br /&gt;
&lt;br /&gt;
        if $(butil msgbox yesno; Quit ?; $DSPExMode) == yes then&lt;br /&gt;
                //      place the display-close message in the message queue to end the xplot message loop&lt;br /&gt;
                msgqueue &#039;display $($#obj display) close&#039;&lt;br /&gt;
                //      set mode variable to empty-string if C-Q key was pressed&lt;br /&gt;
                DSPExMode := &#039;&#039;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-C (COPY) and Control-S (SAVE) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCC keyCS) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0 (later used to retrieve data)&lt;br /&gt;
        #obj := $#obj graph 0; instance&lt;br /&gt;
&lt;br /&gt;
        //      select the data to be saved and the save format&lt;br /&gt;
        #todo := butil msgbox userdefined Amp Frq+Amp Cancel;; $DSPExMode - $(word $#i &#039;Copy to Clipboard&#039; &#039;Save to CSV-File&#039;) &lt;br /&gt;
        if $#todo == Amp then&lt;br /&gt;
                #table := eval $($#obj get ydata)       //      use eval to get a copy of y-data&lt;br /&gt;
        else if $#todo == Frq+Amp then&lt;br /&gt;
                if &#039;$DSPExMode&#039; == DSPExAvrSpectrum then&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , $($#obj get ydata) ) // merge x- and y-data into one table&lt;br /&gt;
                else&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , trn($($#obj get ydata)) ) // merge x- and transposed y-data into one table&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      copy / save if table exists&lt;br /&gt;
        if $#table[?] == table then&lt;br /&gt;
                //      select target&lt;br /&gt;
                if $#i == 0 then&lt;br /&gt;
                        #file := set clipboard  // set target to &amp;quot;clipboard&amp;quot; for all copy_xxx functions&lt;br /&gt;
                else&lt;br /&gt;
                        #file := butil filedialog save; Select Output File; ; CSV=CSV-File; TXT=Textfile        //      use filedialog to select the output file&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
                //      use the CON-object to copy/save table&lt;br /&gt;
                if &#039;$#file&#039; != &#039;&#039; con savedata text; $#table; $#file; 0; comma; dot&lt;br /&gt;
                delete $#table&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-I (INFO) || Control-M (MAX-MEAN) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCI keyCM) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0&lt;br /&gt;
        #obj := $#obj graph 0;inst&lt;br /&gt;
&lt;br /&gt;
        //      save original graph title&lt;br /&gt;
        if &#039;$GraphTitle&#039; == &#039;&#039; GraphTitle := $#obj get title&lt;br /&gt;
&lt;br /&gt;
        if $#i == 0 then&lt;br /&gt;
                //      get and display cursor positions&lt;br /&gt;
                readstr &#039;$($#obj get cursorposition)&#039; #i1 #x1 #y1 #i2 #x2 #y2 #&lt;br /&gt;
                #text := format &#039;Index = %d .. %d,  X = %g ... %g (%g),  Y = %g ... %g (%g)&#039; $#i1 $#i2 $#x1 $#x2 abs($#x1-$#x2) $#y1 $#y2 abs($#y1-$#y2)&lt;br /&gt;
        else&lt;br /&gt;
                //      set cursor mode (on), style (crosshair), rubberline (off), bind-mode (off), bind-functionindex (0)&lt;br /&gt;
                $#obj set cursormode on crosshair off off 0&lt;br /&gt;
                //      get x- and y-data&lt;br /&gt;
                #x := $#obj get xdata&lt;br /&gt;
                #y := $#obj get ydata&lt;br /&gt;
                //      find index of maximum y value &lt;br /&gt;
                #imax := eval imax($#y[*,0])&lt;br /&gt;
                //      compute mean of x and y&lt;br /&gt;
                #xavr := eval avr($#x)&lt;br /&gt;
                #yavr := eval avr($#y)&lt;br /&gt;
                //      set cursor 1 to maximum and cursor 2 to mean&lt;br /&gt;
                $#obj set cursorpos 1 $#x[$#imax] $#y[$#imax] deselect&lt;br /&gt;
                $#obj set cursorpos 2 $#xavr $#yavr deselect&lt;br /&gt;
                //      show maximum and mean in xgraph title&lt;br /&gt;
                #text := format &#039;Maximum( %g , %g ), Average( %g , %g )&#039; $#x[$#imax] $#y[$#imax] $#xavr $#yavr&lt;br /&gt;
        end&lt;br /&gt;
        //      show info in graph title&lt;br /&gt;
        $#obj set title $GraphTitle -- $#text&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      note: the return value of the callback function is not used by the xplot/xgraph message handler&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExLib                        Implements a set of signal processing functions which can be called with&lt;br /&gt;
//                                              &amp;quot;DSPLIBEXAMPLE functionname functionarguments&amp;quot;. This call style is often&lt;br /&gt;
//                                              used to reduce the number of macros of a script or application.&lt;br /&gt;
//&lt;br /&gt;
//      Functions:&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB GETSEGMENTS&lt;br /&gt;
//                      result: a list of all segments selected in the DataSet view stored in a simple&lt;br /&gt;
//                                      table (per line: &#039;setReference ; segmentId ; channelIndex&#039;)&lt;br /&gt;
//                      note:   this function shows an error message and terminates the caller if no segments&lt;br /&gt;
//                                      are selected&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AVERAGESPECTRUM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: an averaged fft spectrum in the selected format&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB SPECTROGRAM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                                                                                                      or COMPLEX&lt;br /&gt;
//                      result: a matrix of fft spectra in the selected format, one spectrum per line&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB FREQUENCYSCALE sr ; n ; type&lt;br /&gt;
//                      sr                      sampling rate in Hz&lt;br /&gt;
//                      n                       number of spectrum bins (equally spaced in the Hz domain)&lt;br /&gt;
//                      type            type of frequency scale:        HZ, KHZ, BARK, MEL, ERB&lt;br /&gt;
//                      result: &#039;frq unit df&#039;; frq is the frequency scale vector, unit is the frequency unit&lt;br /&gt;
//                                      name and df is the frequency scale step in Hz&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AMPLITUDESCALE type&lt;br /&gt;
//                      type            type of amplitude scale:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: &#039;name unit df&#039;; name and unit of amplitude scale&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExLib]&lt;br /&gt;
&lt;br /&gt;
//      function call dispatching&lt;br /&gt;
readvar #argv #fun #argv /d&lt;br /&gt;
goto fun$#fun noFun&lt;br /&gt;
&lt;br /&gt;
noFun:&lt;br /&gt;
//      function not implemented&lt;br /&gt;
//      result: empty string&lt;br /&gt;
&lt;br /&gt;
        //      show an error message and exit&lt;br /&gt;
        con log &#039;$#mac function &amp;quot;$#fun&amp;quot; not implemented&#039; &lt;br /&gt;
        exit 1 set &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funGetSegments: //      in:&lt;br /&gt;
                                //      out:    segment_list_table&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      retrieve list of selected segments from the DataSet application&lt;br /&gt;
        #segments := datasetcmd getselected segments&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table &amp;amp;&amp;amp; &#039;$#segments[]&#039; &amp;gt; 0 exit 1 set $#segments&lt;br /&gt;
        butil msgbox msg ; no segments selected - select and try again; Error!&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table delete $#segments&lt;br /&gt;
        exit 2 set &#039;&#039;   //      terminate this and the calling macro!&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAverageSpectrum:     //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                        //      out:    averagespectrum_vector&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      create result table &lt;br /&gt;
        #spg := new table * &lt;br /&gt;
&lt;br /&gt;
        //      compute averaged amplitude spectrum&lt;br /&gt;
        #n := $($#wave framecount)&lt;br /&gt;
        $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
        for #i := 1 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) ) + $#spg&lt;br /&gt;
        end&lt;br /&gt;
        $#spg := eval $#spg / $#n&lt;br /&gt;
&lt;br /&gt;
        //      convert to selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
        else if $#atyp == 2 then &lt;br /&gt;
                $#spg := eval $#spg ?^ 2&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return averaged spectrum&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funSpectrogram: //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                //      out:    spectrogram_matrix&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      check selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#wtyp&#039; dB logarithmic power amplitude linear complex) &amp;lt; 5 then&lt;br /&gt;
                //      compute amplitude or power spectra&lt;br /&gt;
        &lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength)/2 + 1) /p&lt;br /&gt;
                //      compute amplitude spectra&lt;br /&gt;
                #n := $($#wave framecount)&lt;br /&gt;
                for #i := 0 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                        if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
                end&lt;br /&gt;
                //      convert to selected output spectrum type&lt;br /&gt;
                if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                        $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
                else if $#atyp == 2 then &lt;br /&gt;
                        $#spg := eval $#spg ?^ 2&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        else&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
&lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength) + 2) /p&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
                for #i := int $($#wave framecount) to $#i &amp;gt; 0 step #i := int $#i-1&lt;br /&gt;
                        if $#i%50 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval fft ( $($#wave read) ?* $#w )&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return spectrogram matrix&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funFrequencyScale:      //      in:             samplingrate ; spectrumbins ; frequencyscale &lt;br /&gt;
                                        //      out:    frequencyscale_vector frequencyscale_unit frequency_resolution_Hz&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #sr&#039;;&#039;#n&#039;;&#039;#unit&#039;;&#039;#&lt;br /&gt;
        //      generate frequency scale equally spaced in Hz&lt;br /&gt;
        #frq := new table * // dummy table to make frq-scale permanent&lt;br /&gt;
        $#frq := eval fill($#n, 0, $(#df := eval $#sr / 2 / ($#n - 1)) )&lt;br /&gt;
        //      convert to selected scale&lt;br /&gt;
        if $(#unit := keyword &#039;$#unit&#039; Hz kHz Bark Mel ERB) &amp;lt; 0 #unit := 0&lt;br /&gt;
        if $(#unit := word $#unit Hz kHz Bark Mel ERB) == kHz then&lt;br /&gt;
                $#frq := eval $#frq / 1000&lt;br /&gt;
        else if $#unit != Hz then&lt;br /&gt;
                $#frq := eval hz2$#unit($#frq)&lt;br /&gt;
        end&lt;br /&gt;
        //      return scale settings&lt;br /&gt;
        exit 1 set &#039;$#frq $#unit $#df&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAmplitudeScale:      //      in:             amplitudescale &lt;br /&gt;
                                        //      out:    amplitudescale_text amplitudescale_unit&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #unit&#039;;&#039;#&lt;br /&gt;
        //      get text and unit of amplitude scale&lt;br /&gt;
        if $(#i := keyword &#039;$#unit&#039; dB logarithmic power amplitude linear) &amp;lt; 2 #i := 0&lt;br /&gt;
        #unit := word $#i dB dB - - -&lt;br /&gt;
        #text := word $#i amplitude amplitude power amplitude amplitude&lt;br /&gt;
        exit 1 set &#039;$#text $#unit&#039;&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      local subroutines&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
makeWindow:&lt;br /&gt;
        //      GOSUB MAKEWINDOW windowlength windowtype -&amp;gt; windowvector&lt;br /&gt;
        readvar #argv #wlen #wtyp # &lt;br /&gt;
        #list := hanning hamming blackman kaiser bartlett taprect nuttall flattop gauss&lt;br /&gt;
        if $(#wtyp := keyword &#039;$#wtyp&#039; $#list) &amp;lt; 0 #wtyp := 0 &lt;br /&gt;
        exit 1 eval window($#wtyp, $#wlen, 1) * 2 / $#wlen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7122</id>
		<title>Programmer Guide/Macro Library/XPlot</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7122"/>
		<updated>2014-05-20T13:20:56Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
&lt;br /&gt;
==XPlot : CObjEx==&lt;br /&gt;
&lt;br /&gt;
A general class for plotting multiple graphs.&lt;br /&gt;
&lt;br /&gt;
====XPlot Construction====&lt;br /&gt;
&lt;br /&gt;
Initialize a new XPlot-instance to display 1 or more graphs. Returns the new object or an empty string. Information and error messages are written to the &amp;lt;code&amp;gt;BSCRIPT CON&amp;lt;/code&amp;gt; console.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XPlot &amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of rows (default=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of columns for each row (inrow0 inrow1 ...). The default is one column per row.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The display window title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the graphics profile to use. A graphics profile is also known as a colour scheme.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The window position and size (in the format &#039;&amp;lt;code&amp;gt;x y width height&amp;lt;/code&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of an existing display item which should own this new window. See &amp;lt;code&amp;gt;NEW DISPLAY&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
A new &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; object if successful or an empty string.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; instance with one graph is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := xplot&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; Failed to create the xplot instance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====XPlot Member Functions====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class has the following member functions. See CObjEx Member Functions for a list of functions implemented in the parent class.&lt;br /&gt;
&lt;br /&gt;
=====AddPlot=====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; is identical to the &amp;lt;code&amp;gt;PLOT&amp;lt;/code&amp;gt; function, except that it adds to an existing graph (in addition to or on top of the original plot). If no graph exists at the specified &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;, then the call is passed to &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;. It supports the following plot types: &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;. The parameters are identical to the &amp;lt;code&amp;gt;[[#Plot|PLOT]]&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
===Dialog===&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;Dialog&amp;lt;/code&amp;gt; can be used to show and hide a dialog in the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; display.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog &amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The ID of the current or new dialog item or an empty string.&lt;br /&gt;
&lt;br /&gt;
======New======&lt;br /&gt;
&lt;br /&gt;
Creates a new dialog item (deleting the old one first).&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog New&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Delete======&lt;br /&gt;
&lt;br /&gt;
Removes the dialog from the display and deletes the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Msg======&lt;br /&gt;
&lt;br /&gt;
Posts a message to the macro message queue. The format of the message is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgId&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgPar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when the display is closed, this function is called to post the message &amp;lt;code&amp;gt;MENU dialogItem CLOSE&amp;lt;/code&amp;gt; to the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Msg ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message ID.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message parameters.&lt;br /&gt;
&lt;br /&gt;
======On|Enabled======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog On; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Enabled; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Off|Hidden======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Off ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Hidden ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Display===&lt;br /&gt;
&lt;br /&gt;
Returns the ID of the display object associated with this &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; display&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns the display object of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
===End===&lt;br /&gt;
&lt;br /&gt;
Enters the message loop, waits until the user closes the plot display and then destroys itself.&lt;br /&gt;
&lt;br /&gt;
===Get===&lt;br /&gt;
&lt;br /&gt;
Retrieve an attribute from a specific graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Get &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of the requested attribute. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;CURSORPOSITION&amp;lt;/code&amp;gt; - Returns the current cursor positions in the following format: &amp;lt;code&amp;gt;i1 x1 y1 i2 x2 y2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that &amp;lt;code&amp;gt;x1 &amp;lt;= x2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;YDATA&amp;lt;/code&amp;gt; - Returns the y data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;XDATA&amp;lt;/code&amp;gt; - Returns the x data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;RANGE&amp;lt;/code&amp;gt; - Returns the x axis and y axis range in the following format: &amp;lt;code&amp;gt;xmin xmax ymin ymax&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; - Returns the plot type (see &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; for a list of available plot types).&lt;br /&gt;
&lt;br /&gt;
===GetFColors===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GetFColors&amp;lt;/code&amp;gt; function returns a blank separated list of the function colors defined in the selected graphics profile.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; GetFColors&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns a blank separated list of color keywords.&lt;br /&gt;
&lt;br /&gt;
===Graph===&lt;br /&gt;
&lt;br /&gt;
Returns the requested attribute &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; of the graph identified by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Graph &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; [; &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;=GRAPH ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of a graph item, an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XGraph : CObjEx|XGRAPH]]&amp;lt;/code&amp;gt; instance or the &#039;&amp;lt;code&amp;gt;row column&amp;lt;/code&amp;gt;&#039; address of a splitter in the display. Note that the &amp;lt;code&amp;gt;row&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;column&amp;lt;/code&amp;gt; indices are zero-based.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The attribute to returned. The following values are allowed:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;INSTANCE&amp;lt;/code&amp;gt; - Return the id of the &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; instance associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GRAPH&amp;lt;/code&amp;gt; - Return the id of the graph object associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. This is the default attribute.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ROW&amp;lt;/code&amp;gt; - Return the row index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;COLUMN&amp;lt;/code&amp;gt; - Return the column index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return values are selected by the argument &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;. See the description of &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; for details. If the address argument &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; do not refer to a graph, &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; or splitter of the display, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Get the graph item id for the top left graph.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#graph := $#xplot graph 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Legend===&lt;br /&gt;
&lt;br /&gt;
Display a graph legend. Use &amp;lt;code&amp;gt;$#xplot LEGEND $#graph&amp;lt;/code&amp;gt; to clear the legend.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Legend &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;w&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;h&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text1&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text2&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph address (e.g. row and column index. See [[#Plot|PLOT]] for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit for size and position values. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt; - The real x/y values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;percent&amp;lt;/code&amp;gt; - The percent of the graph&#039;s plot area.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x, y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The position of the upper right corner of the first legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;w, h&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width and height of one legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The legend text color.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This flag selects the line attributes to be displayed. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt; - The color.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; - The color, style, width and symbol.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text for the legend for function X. If no text is supplied, the legend line is removed.This parameter can be either a string, or a simple table.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
void&lt;br /&gt;
&lt;br /&gt;
===Plot===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; can be used to plot a function in a graph. Currently, {{STX}} supports waveform , x/y (aka function and more specifically parameter), spectrogram and waterfall plots.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Plot an x/y function graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see the member function [[#Graph|GRAPH]] for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis data (a vector or an array).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data to be used for the x axis. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:A data vector with &amp;lt;code&amp;gt;y[!nrow]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. This is the default and means that the x axis uses the values &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:A blank separated list of values (&#039;x1 x2&#039; -&amp;gt; x[i] = x1+(x2-x1)/(y[!nrow]-1), i = 0..&amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be displayed in this plot.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The x axis display range. This can be one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xmin xmax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the x axis unit (e.g. &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;). The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt; plot only allows the following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the x axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ymin ymax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the y axis unit (e.g. &amp;lt;code&amp;gt;dB&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the y axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; argument (see &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; for details) or a zero-based function line index as specified in a color scheme (see Color Schemes in the User Guide).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xlabtab, ylabtab, zlabtab&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Extended tables containing the scale, grid and label definitions. For a description of the table format, please see the scale definition table for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Plot a simple x/y function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := XPLOT 1 ; 1 ; XPLOT ; Default ; 0 0 400 400&lt;br /&gt;
$#xplot plot 0 ; XYPLOT; $(eval fill(10, 0, 1)) ; * ; xyplot ; * ; ; x-axis ; * ; ; y-axis&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Plot a function graph. Note that this is identical to an &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y ; x ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter descriptions.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======parameter======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter graph. A parameter graph differs from a function graph because a parameter plot can have missing values - it does not necessarily have values for every point on the x axis.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; parameter ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======spectrogram======&lt;br /&gt;
&lt;br /&gt;
Plot a spectrogram graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; spectrogram ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A data array containing one spectrum or function line per &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; row. Note that this parameter is specific to the &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WATERFALL&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y-scale data (frequency). This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:1) &amp;lt;code&amp;gt;vData&amp;lt;/code&amp;gt; - A data vector with &amp;lt;code&amp;gt;y[!ncol]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:2) * - An asterisk: &amp;lt;code&amp;gt;y[i] = i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;. This is the default.&lt;br /&gt;
&lt;br /&gt;
:3) &amp;lt;code&amp;gt;y1 y2&amp;lt;/code&amp;gt; - Two blank separated values: &amp;lt;code&amp;gt;y[i] = y1+i*(y2-y1)/(d[!ncol]-1)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z scale is a color scale. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zdown&amp;lt;/code&amp;gt; - A numerical value. The maximum z value is chosen automatically and the minimum value is calculated as follows: &amp;lt;code&amp;gt;zmax-zdown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WATERFALL======&lt;br /&gt;
&lt;br /&gt;
Plot a waterfall graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WATERFALL ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zlabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data array (one spectrum or function-line / row).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z axis display range. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the z axis unit (e.g. &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the z axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the x scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the y scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of lines to be plotted. The default is &amp;lt;code&amp;gt;150&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WAVEFORM======&lt;br /&gt;
&lt;br /&gt;
Plot a waveform graph. Note that the displayed wave item is automatically attached to the graph. This means, no explicit call to &amp;lt;code&amp;gt;SetWave&amp;lt;/code&amp;gt; is necessary.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WAVEFORM ; &amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;XWAVE&amp;lt;/code&amp;gt; instance&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit to use on the x axis. The following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum waveform amplitude. This can be a value between 0 and ...&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be any positive number. The default is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the waveform envelope should be filled or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======TEXTBOX======&lt;br /&gt;
&lt;br /&gt;
Plot a graph containing text.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; TEXTBOX ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text color. This can be an of the {{STX}} color arguments.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The horizontal text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The vertical text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TOP&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BOTTOM&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text to be displayed. This can be a simple table with an entry per line of text or a semi-colon separated list of text lines.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======fstyle======&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;fstyle&amp;lt;/var&amp;gt; argument passed to the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; functions &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; has the following syntax and components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Determines whether the function line is solid (&amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt;), dotted (&amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt;) or dashed (&amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt;). The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line on screen. This can be any {{STX}} colour keyword or RGB value. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line when printing. See &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; for details. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width of the function line. Possible values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The style to use to draw the function. Each function point can be plotted separately (&amp;lt;code&amp;gt;POINTS&amp;lt;/code&amp;gt;), a line can be drawn between each function point (&amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;), the area below the function can be filled with the &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;AREA&amp;lt;/code&amp;gt;), the function points can be joined by steps (&amp;lt;code&amp;gt;STEPS&amp;lt;/code&amp;gt; - note that this is only available for the &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plot) or no points are plotted (&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; - this is best used when a drawing symbol (&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;) is defined). The default style is &amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The symbol to draw at each point. This can be used in conjunction with a drawing style (see &amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;). The following keywords are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;SQUARE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TRIANGLE|CIRCLE|CROSS|DIAMOND&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The default style is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value to use for missing y values. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not specified (empty) all values are displayed, otherwise all points where &amp;lt;code&amp;gt;y=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; are not displayed. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not empty and is not a number then &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. If no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is defined, no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is used (this is the default).&lt;br /&gt;
&lt;br /&gt;
===Redraw===&lt;br /&gt;
&lt;br /&gt;
Redraw the selected graph. This is currently only implemented for the &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; REDRAW &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for details).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return 0 if successful.&lt;br /&gt;
&lt;br /&gt;
===ScaleOctave===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Create a scale definition table for a logarithmic frequency axis with 2000 points at 10 Hz intervals and a maximum frequency of 10000 Hz.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$(xplot scaleOctave 10 2000; 10000)&#039; #xmin #xmax #xlab #x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also ScaleSteps.&lt;br /&gt;
&lt;br /&gt;
===ScaleLog10===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleSteps&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===ScaleSteps===&lt;br /&gt;
&lt;br /&gt;
Generate a linear scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically, e.g. &#039;&amp;lt;code&amp;gt;xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;min, max&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The label distance in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the major grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between major ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the minor grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between minor ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;min max labTab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;max&amp;lt;/code&amp;gt; are is the computed or corrected scale range and &amp;lt;code&amp;gt;labTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Calculate the linear scale, grid and labels for an amplitude axis between -70 and -10 dB with labels every 10 dB, major grid lines and ticks every 5dB and minor grid lines and ticks every dB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$($#xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1)&#039; #ymin #ymax #ylab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleLog10&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Set===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; function sets the cursor mode and text attributes.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Set [ &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;|* ; ] &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xgraph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An xgraph instance on which to call the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command. If no graph is specified or an asterisk, then the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command is carried out on all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:One of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt; - turn cursors on and off and change the way they look.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xunit&amp;lt;/code&amp;gt; - the name of the x-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;yunit&amp;lt;/code&amp;gt; - the name of the y-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xtext&amp;lt;/code&amp;gt; - the description of the x-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ytext&amp;lt;/code&amp;gt; - the description of the y-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; - the graph&#039;s title&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value of &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; depends on &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;mode|* type|* line|*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Where mode is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt; - show the cursor&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; - hide the cursor&lt;br /&gt;
&lt;br /&gt;
:Where &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;vbarcross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;harmonic&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:And &amp;lt;code&amp;gt;line&amp;lt;/code&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; |&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is not &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is used as the text, unit or title.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetCallback===&lt;br /&gt;
&lt;br /&gt;
The callback function is called by the message handlers to process popup and context menu messages and hotkeys which are not used by &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt;. The following commands are used to call the callback function:&lt;br /&gt;
&lt;br /&gt;
If called from an &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xgraphinstance irow icol msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If called from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xplotinstance * * msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetCallback [ &amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the callback function or an empty string to remove a previous association.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetWave===&lt;br /&gt;
&lt;br /&gt;
Attach a signal to one graph or all graphs (see &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;). If a wave item is attached to a graph, it can not be deleted before it is detached or the graph or &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance is deleted.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function Graph for details). If this parameter is omitted, then the wave item is set for all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XWave : CObjEx|XWAVE]]&amp;lt;/code&amp;gt; instance (or empty to remove attachment).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
Note that wave items can only be attached to graphs of type &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt;.====XPlot Hotkeys====&lt;br /&gt;
&lt;br /&gt;
The following hotkeys are implemented in the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Turn the cursors on and off.&lt;br /&gt;
|-&lt;br /&gt;
|S&lt;br /&gt;
|Change to the next cursor style.&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Turn cursor binding on and off.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+N&lt;br /&gt;
|Bind the cursor to the next function.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+P&lt;br /&gt;
|Bind the cursor to the previous function.&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|Turn the cursor rubberline on and off.&lt;br /&gt;
|-&lt;br /&gt;
|T&lt;br /&gt;
|Turn the title on and off.&lt;br /&gt;
|-&lt;br /&gt;
|X&lt;br /&gt;
|Change to the next x&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Y&lt;br /&gt;
|Change to the next y&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Z&lt;br /&gt;
|Change to the next z&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Space&lt;br /&gt;
|Open the setup dialog.&lt;br /&gt;
|-&lt;br /&gt;
|P&lt;br /&gt;
|Play the attached wave (between the cursors).&lt;br /&gt;
|-&lt;br /&gt;
|Q&lt;br /&gt;
|Play the attached wave (the whole signal).&lt;br /&gt;
|-&lt;br /&gt;
|ESC&lt;br /&gt;
|Stop playback.&lt;br /&gt;
|-&lt;br /&gt;
|Ins&lt;br /&gt;
|Show the selected metasegment&#039;s settings in a dialog or, if no metasegment is selected, show a dialog to create a new metasegment.&lt;br /&gt;
|-&lt;br /&gt;
|Del&lt;br /&gt;
|Delete the selected metasegments.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+Left Click&lt;br /&gt;
|Move the legend to the clicked position.&lt;br /&gt;
|-&lt;br /&gt;
|Shift+Left Click&lt;br /&gt;
|Create a metasegment at the clicked position (show the &#039;Insert Metasegment&#039; dialog).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XPlot Examples====&lt;br /&gt;
&lt;br /&gt;
=====Simple XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates simple &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; usage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro xplot_example_1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display (and graph)&lt;br /&gt;
    //&lt;br /&gt;
    #xplot := xplot 2 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
    if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
    //&lt;br /&gt;
    // plot graphs (including data generation)&lt;br /&gt;
    //&lt;br /&gt;
    #nValues := 100&lt;br /&gt;
    $#xplot Plot 0 0 ; XYPLOT ; $(eval fill($#nValues,1,1)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    $#xplot Plot 1 0 ; SPECTROGRAM ; $(eval rand(1,100,100)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    // the clean up takes place automatically&lt;br /&gt;
    // when the plot window is closed&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Plot rows of a matrix using XPLOT=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates how to plot the rows of a matrix using the &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//{{3.9 6473}{2009.01.29  16.44.04} - automatically created version information - do not change or delete this line}&lt;br /&gt;
&lt;br /&gt;
[macro xplot_example_2]&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      This row demonstrates how to plot each row of a matrix&lt;br /&gt;
//&lt;br /&gt;
//      C.G. 29.1.2009&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create display (and graph)&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#xplot := xplot 1 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create a matrix and fill it with some meaningless data&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#mat := new table * /Parameter * number:X:100&lt;br /&gt;
if &#039;$#mat[?]&#039; != table em -1 ; cannot create table ($emsg)&lt;br /&gt;
&lt;br /&gt;
for #i := 0 to $#i &amp;lt; 10 step #i := int $#i + 1&lt;br /&gt;
        $#mat[$#i,*] := eval fill( 100, $#i+1, $#i+1 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// plot each row of the matrix&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
for #i := int 0 to $#i &amp;lt; $#mat[!nrow] step #i := int $#i + 1&lt;br /&gt;
        #x := eval $#mat[$#i,*]&lt;br /&gt;
        $#xplot AddPlot 0 0 ; XYPLOT ; $#x ; * ; row-by-row plot ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Advanced XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
This example not only demonstrates the use of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class, but also signal processing using the &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
//      &lt;br /&gt;
//      DSP Examples&lt;br /&gt;
//      &lt;br /&gt;
//      last update:    Nov 17, 2007 (AN)&lt;br /&gt;
//      {{STX}} version:    {{STX}} 3.8 Beta&lt;br /&gt;
//&lt;br /&gt;
//      The examples in this file demonstrates how to ...&lt;br /&gt;
//              ...     use the EVAL command for signal processing&lt;br /&gt;
//              ...     use the class XWAVE     to read a signal frame by frame&lt;br /&gt;
//              ...     display spectrograms, waveforms and functions in XPLOT graphs&lt;br /&gt;
//              ...     enable XPLOT to play signals&lt;br /&gt;
//              ...     use the XPLOT callback function to implement simple user controls&lt;br /&gt;
//              ...     set and get cursor attritbutes and positions of XPLOT graphs&lt;br /&gt;
//              ...     add a legend to a XPLOT graph&lt;br /&gt;
//              ... use BUTIL MSGBOX for simple dialogs&lt;br /&gt;
//              ...     use the CON object (class BScript) to display log. messages&lt;br /&gt;
//              ...     use the CON object to save numeric tables to textfiles&lt;br /&gt;
//              ...     simulate item messages using the message queue macro MSGQUEUE&lt;br /&gt;
//              ...     implement and call local subroutines&lt;br /&gt;
//&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExAvrSpectrum                Create a plot containing the average spectra of all segments selected&lt;br /&gt;
//                                                      in the DataSet view.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExAvrSpectrum #lfrm=100ms&#039;;&#039;#sfrm=50%&#039;;&#039;#wtyp=hamming&#039;;&#039;#ascale=dB&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming, ...)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      create the result table (one spectrum per row)&lt;br /&gt;
#asp := new table * * num:x:$#segments[] /p&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
#nok := 0       //      number of computed average spectra&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
        con log process segment &amp;quot;set=$#aset, id=$#aseg, ch=$#ach&amp;quot; ($(int $#i+1) of $#segments[])&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        //      usage: XWAVE setref ; segmentid ; channel ; mode ; framelength ; frameshift ; ampmax ; ampref&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        //      set / check sampling rate&lt;br /&gt;
        else if &#039;$#srate&#039; == &#039;&#039; then&lt;br /&gt;
                #srate := $($#wave srate)       &lt;br /&gt;
        else if $($#wave srate) != $#srate then&lt;br /&gt;
                butil &#039;msgbox msg; segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; - sampling rate mismatch; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        //      compute the average spectrum&lt;br /&gt;
        if $(#tmp := dspexlib averagespectrum $#wave ; $#wtyp ; $#ascale)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute average spectrum of segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
                &lt;br /&gt;
        $#asp[*,$#nok] := $#tmp                                 //      save the spectrum&lt;br /&gt;
        delete $#tmp                                                    //      delete temp. buffer&lt;br /&gt;
        #legend := &#039;$#legend $($#wave title);&#039;  //      add segment to legend string&lt;br /&gt;
        $#wave destroy                                                  //      delete wave object&lt;br /&gt;
        #nok := int $#nok+1                                             //      increment result vector counter&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      exit if no results are computed&lt;br /&gt;
if $#nok &amp;lt; 1 exit &lt;br /&gt;
&lt;br /&gt;
//      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
readstr &#039;$(dspexlib frequencyscale $#srate ; $#asp[!nrow] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
//      create and configure the plot object&lt;br /&gt;
//      usage: XPLOT rows ; cols0 cols1 .. ; windowtitle ; graphicprofile ; wx wy wwidth wheight&lt;br /&gt;
#plot := xplot 1; 1; Average Spectrum; Rainbow; 0 0 1024 800&lt;br /&gt;
&lt;br /&gt;
//      plot all spectra and display the legend&lt;br /&gt;
#title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; $#df&lt;br /&gt;
readstr &#039;$(dspexlib amplitudescale $#ascale)&#039; #ytext #yunit&lt;br /&gt;
//      usage: xplot PLOT row col; FUNCTION; ydata; xdata; title; xrange; xunit; xtext; yrange; yunit; yrange&lt;br /&gt;
$#plot plot 0; function; $#asp; $#frq; $#title; ; $#funit; frequency; ; $#yunit ; $#ytext&lt;br /&gt;
$#plot legend 0; %; 50; 95; 45; 5; black; color; $#legend&lt;br /&gt;
$#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
$#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
//      wait until plot window is closed &lt;br /&gt;
$#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
//      finished - cleanup and and exit&lt;br /&gt;
delete $#asp $#frq $#segments   //      delete data items&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExSpectrogram                Plot a spectrogram of all segments selected in the DataSet view.&lt;br /&gt;
//                                                      For each segment one spectrogram window is displayed. The window&lt;br /&gt;
//                                                      must be closed before the next segment is analysed.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExSpectrogram #lfrm=40ms&#039;;&#039;#sfrm=10%&#039;;&#039;#wtyp=hamming&#039;;&#039;#arange=50&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming)&lt;br /&gt;
//                              #arange         spectrogram display range in dB (max .. max-range)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode variable to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] &amp;amp;&amp;amp; &#039;$DSPExMode&#039; != &#039;&#039; step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute the spectrogram&lt;br /&gt;
        if $(#asp := dspexlib spectrogram $#wave ; $#wtyp ; log)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute spectrogram of segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
        readstr &#039;$(dspexlib frequencyscale $($#wave srate) ; $#asp[!ncol] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
        //      create and configure the plot object&lt;br /&gt;
        #plot := xplot 2; 1 1; $($#wave title)   quit = c-q, next = c-n; Rainbow; 0 0 1024 800&lt;br /&gt;
        $($#plot display) height 3 1 /apply             //      set height of graphs&lt;br /&gt;
&lt;br /&gt;
        //      plot spectrogram and waveform&lt;br /&gt;
        #title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, arange=%s, amax=%.1fdB, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; &#039;$#arange&#039; $(eval max($#asp)) $#df&lt;br /&gt;
        $#plot plot 0; spectrogram; $#asp; $#frq; $#title; $($#wave tbegin) $($#wave tend); s; time; ; $#funit; frequency; $#arange&lt;br /&gt;
        $#plot plot 1; waveform; $#wave; ; s; time; $($#wave amax); $($#wave amax); amplitude; 1&lt;br /&gt;
        $#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
        $#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
        //      assign wave object to xplot graphs (for playback)&lt;br /&gt;
        $#plot setwave $#wave &lt;br /&gt;
&lt;br /&gt;
        //      wait until plot window is closed &lt;br /&gt;
        $#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
        //      cleanup&lt;br /&gt;
        delete $#asp $#frq              //      delete data items&lt;br /&gt;
        $#wave destroy                  //      delete wave object&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      finished - cleanup and exit&lt;br /&gt;
delete $#segments       //      delete segment table&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExCallback                   Callback function for XPLOT.&lt;br /&gt;
//&lt;br /&gt;
//      arguments:&lt;br /&gt;
//              if called from xplotobject message handler      -&amp;gt;   &#039;CALLBACK xplotobject * * msgid msgpar&#039;                   &lt;br /&gt;
//              if called from xgraphobject message handler     -&amp;gt;   &#039;CALLBACK xgraphobject row col msgid msgpar&#039;&lt;br /&gt;
//&lt;br /&gt;
//      Note: This macro uses the shell variable DSPEXMODE to check which macro has installed the &lt;br /&gt;
//      callback and to set return values.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExCallback #obj #row #col #msgid #msgpar]&lt;br /&gt;
&lt;br /&gt;
//      get xplot-object if called from a xgraph-object&lt;br /&gt;
if &#039;$#obj[!class]&#039; == xgraph #obj := $#obj get xplot&lt;br /&gt;
&lt;br /&gt;
//      message filter for keystroke messages&lt;br /&gt;
&lt;br /&gt;
//      process Control-Q (QUIT) key&lt;br /&gt;
if &#039;$#msgid$#msgpar&#039; == keyCQ then&lt;br /&gt;
&lt;br /&gt;
        if $(butil msgbox yesno; Quit ?; $DSPExMode) == yes then&lt;br /&gt;
                //      place the display-close message in the message queue to end the xplot message loop&lt;br /&gt;
                msgqueue &#039;display $($#obj display) close&#039;&lt;br /&gt;
                //      set mode variable to empty-string if C-Q key was pressed&lt;br /&gt;
                DSPExMode := &#039;&#039;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-C (COPY) and Control-S (SAVE) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCC keyCS) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0 (later used to retrieve data)&lt;br /&gt;
        #obj := $#obj graph 0; instance&lt;br /&gt;
&lt;br /&gt;
        //      select the data to be saved and the save format&lt;br /&gt;
        #todo := butil msgbox userdefined Amp Frq+Amp Cancel;; $DSPExMode - $(word $#i &#039;Copy to Clipboard&#039; &#039;Save to CSV-File&#039;) &lt;br /&gt;
        if $#todo == Amp then&lt;br /&gt;
                #table := eval $($#obj get ydata)       //      use eval to get a copy of y-data&lt;br /&gt;
        else if $#todo == Frq+Amp then&lt;br /&gt;
                if &#039;$DSPExMode&#039; == DSPExAvrSpectrum then&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , $($#obj get ydata) ) // merge x- and y-data into one table&lt;br /&gt;
                else&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , trn($($#obj get ydata)) ) // merge x- and transposed y-data into one table&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      copy / save if table exists&lt;br /&gt;
        if $#table[?] == table then&lt;br /&gt;
                //      select target&lt;br /&gt;
                if $#i == 0 then&lt;br /&gt;
                        #file := set clipboard  // set target to &amp;quot;clipboard&amp;quot; for all copy_xxx functions&lt;br /&gt;
                else&lt;br /&gt;
                        #file := butil filedialog save; Select Output File; ; CSV=CSV-File; TXT=Textfile        //      use filedialog to select the output file&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
                //      use the CON-object to copy/save table&lt;br /&gt;
                if &#039;$#file&#039; != &#039;&#039; con savedata text; $#table; $#file; 0; comma; dot&lt;br /&gt;
                delete $#table&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-I (INFO) || Control-M (MAX-MEAN) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCI keyCM) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0&lt;br /&gt;
        #obj := $#obj graph 0;inst&lt;br /&gt;
&lt;br /&gt;
        //      save original graph title&lt;br /&gt;
        if &#039;$GraphTitle&#039; == &#039;&#039; GraphTitle := $#obj get title&lt;br /&gt;
&lt;br /&gt;
        if $#i == 0 then&lt;br /&gt;
                //      get and display cursor positions&lt;br /&gt;
                readstr &#039;$($#obj get cursorposition)&#039; #i1 #x1 #y1 #i2 #x2 #y2 #&lt;br /&gt;
                #text := format &#039;Index = %d .. %d,  X = %g ... %g (%g),  Y = %g ... %g (%g)&#039; $#i1 $#i2 $#x1 $#x2 abs($#x1-$#x2) $#y1 $#y2 abs($#y1-$#y2)&lt;br /&gt;
        else&lt;br /&gt;
                //      set cursor mode (on), style (crosshair), rubberline (off), bind-mode (off), bind-functionindex (0)&lt;br /&gt;
                $#obj set cursormode on crosshair off off 0&lt;br /&gt;
                //      get x- and y-data&lt;br /&gt;
                #x := $#obj get xdata&lt;br /&gt;
                #y := $#obj get ydata&lt;br /&gt;
                //      find index of maximum y value &lt;br /&gt;
                #imax := eval imax($#y[*,0])&lt;br /&gt;
                //      compute mean of x and y&lt;br /&gt;
                #xavr := eval avr($#x)&lt;br /&gt;
                #yavr := eval avr($#y)&lt;br /&gt;
                //      set cursor 1 to maximum and cursor 2 to mean&lt;br /&gt;
                $#obj set cursorpos 1 $#x[$#imax] $#y[$#imax] deselect&lt;br /&gt;
                $#obj set cursorpos 2 $#xavr $#yavr deselect&lt;br /&gt;
                //      show maximum and mean in xgraph title&lt;br /&gt;
                #text := format &#039;Maximum( %g , %g ), Average( %g , %g )&#039; $#x[$#imax] $#y[$#imax] $#xavr $#yavr&lt;br /&gt;
        end&lt;br /&gt;
        //      show info in graph title&lt;br /&gt;
        $#obj set title $GraphTitle -- $#text&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      note: the return value of the callback function is not used by the xplot/xgraph message handler&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExLib                        Implements a set of signal processing functions which can be called with&lt;br /&gt;
//                                              &amp;quot;DSPLIBEXAMPLE functionname functionarguments&amp;quot;. This call style is often&lt;br /&gt;
//                                              used to reduce the number of macros of a script or application.&lt;br /&gt;
//&lt;br /&gt;
//      Functions:&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB GETSEGMENTS&lt;br /&gt;
//                      result: a list of all segments selected in the DataSet view stored in a simple&lt;br /&gt;
//                                      table (per line: &#039;setReference ; segmentId ; channelIndex&#039;)&lt;br /&gt;
//                      note:   this function shows an error message and terminates the caller if no segments&lt;br /&gt;
//                                      are selected&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AVERAGESPECTRUM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: an averaged fft spectrum in the selected format&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB SPECTROGRAM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                                                                                                      or COMPLEX&lt;br /&gt;
//                      result: a matrix of fft spectra in the selected format, one spectrum per line&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB FREQUENCYSCALE sr ; n ; type&lt;br /&gt;
//                      sr                      sampling rate in Hz&lt;br /&gt;
//                      n                       number of spectrum bins (equally spaced in the Hz domain)&lt;br /&gt;
//                      type            type of frequency scale:        HZ, KHZ, BARK, MEL, ERB&lt;br /&gt;
//                      result: &#039;frq unit df&#039;; frq is the frequency scale vector, unit is the frequency unit&lt;br /&gt;
//                                      name and df is the frequency scale step in Hz&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AMPLITUDESCALE type&lt;br /&gt;
//                      type            type of amplitude scale:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: &#039;name unit df&#039;; name and unit of amplitude scale&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExLib]&lt;br /&gt;
&lt;br /&gt;
//      function call dispatching&lt;br /&gt;
readvar #argv #fun #argv /d&lt;br /&gt;
goto fun$#fun noFun&lt;br /&gt;
&lt;br /&gt;
noFun:&lt;br /&gt;
//      function not implemented&lt;br /&gt;
//      result: empty string&lt;br /&gt;
&lt;br /&gt;
        //      show an error message and exit&lt;br /&gt;
        con log &#039;$#mac function &amp;quot;$#fun&amp;quot; not implemented&#039; &lt;br /&gt;
        exit 1 set &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funGetSegments: //      in:&lt;br /&gt;
                                //      out:    segment_list_table&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      retrieve list of selected segments from the DataSet application&lt;br /&gt;
        #segments := datasetcmd getselected segments&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table &amp;amp;&amp;amp; &#039;$#segments[]&#039; &amp;gt; 0 exit 1 set $#segments&lt;br /&gt;
        butil msgbox msg ; no segments selected - select and try again; Error!&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table delete $#segments&lt;br /&gt;
        exit 2 set &#039;&#039;   //      terminate this and the calling macro!&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAverageSpectrum:     //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                        //      out:    averagespectrum_vector&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      create result table &lt;br /&gt;
        #spg := new table * &lt;br /&gt;
&lt;br /&gt;
        //      compute averaged amplitude spectrum&lt;br /&gt;
        #n := $($#wave framecount)&lt;br /&gt;
        $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
        for #i := 1 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) ) + $#spg&lt;br /&gt;
        end&lt;br /&gt;
        $#spg := eval $#spg / $#n&lt;br /&gt;
&lt;br /&gt;
        //      convert to selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
        else if $#atyp == 2 then &lt;br /&gt;
                $#spg := eval $#spg ?^ 2&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return averaged spectrum&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funSpectrogram: //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                //      out:    spectrogram_matrix&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      check selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#wtyp&#039; dB logarithmic power amplitude linear complex) &amp;lt; 5 then&lt;br /&gt;
                //      compute amplitude or power spectra&lt;br /&gt;
        &lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength)/2 + 1) /p&lt;br /&gt;
                //      compute amplitude spectra&lt;br /&gt;
                #n := $($#wave framecount)&lt;br /&gt;
                for #i := 0 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                        if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
                end&lt;br /&gt;
                //      convert to selected output spectrum type&lt;br /&gt;
                if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                        $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
                else if $#atyp == 2 then &lt;br /&gt;
                        $#spg := eval $#spg ?^ 2&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        else&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
&lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength) + 2) /p&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
                for #i := int $($#wave framecount) to $#i &amp;gt; 0 step #i := int $#i-1&lt;br /&gt;
                        if $#i%50 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval fft ( $($#wave read) ?* $#w )&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return spectrogram matrix&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funFrequencyScale:      //      in:             samplingrate ; spectrumbins ; frequencyscale &lt;br /&gt;
                                        //      out:    frequencyscale_vector frequencyscale_unit frequency_resolution_Hz&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #sr&#039;;&#039;#n&#039;;&#039;#unit&#039;;&#039;#&lt;br /&gt;
        //      generate frequency scale equally spaced in Hz&lt;br /&gt;
        #frq := new table * // dummy table to make frq-scale permanent&lt;br /&gt;
        $#frq := eval fill($#n, 0, $(#df := eval $#sr / 2 / ($#n - 1)) )&lt;br /&gt;
        //      convert to selected scale&lt;br /&gt;
        if $(#unit := keyword &#039;$#unit&#039; Hz kHz Bark Mel ERB) &amp;lt; 0 #unit := 0&lt;br /&gt;
        if $(#unit := word $#unit Hz kHz Bark Mel ERB) == kHz then&lt;br /&gt;
                $#frq := eval $#frq / 1000&lt;br /&gt;
        else if $#unit != Hz then&lt;br /&gt;
                $#frq := eval hz2$#unit($#frq)&lt;br /&gt;
        end&lt;br /&gt;
        //      return scale settings&lt;br /&gt;
        exit 1 set &#039;$#frq $#unit $#df&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAmplitudeScale:      //      in:             amplitudescale &lt;br /&gt;
                                        //      out:    amplitudescale_text amplitudescale_unit&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #unit&#039;;&#039;#&lt;br /&gt;
        //      get text and unit of amplitude scale&lt;br /&gt;
        if $(#i := keyword &#039;$#unit&#039; dB logarithmic power amplitude linear) &amp;lt; 2 #i := 0&lt;br /&gt;
        #unit := word $#i dB dB - - -&lt;br /&gt;
        #text := word $#i amplitude amplitude power amplitude amplitude&lt;br /&gt;
        exit 1 set &#039;$#text $#unit&#039;&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      local subroutines&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
makeWindow:&lt;br /&gt;
        //      GOSUB MAKEWINDOW windowlength windowtype -&amp;gt; windowvector&lt;br /&gt;
        readvar #argv #wlen #wtyp # &lt;br /&gt;
        #list := hanning hamming blackman kaiser bartlett taprect nuttall flattop gauss&lt;br /&gt;
        if $(#wtyp := keyword &#039;$#wtyp&#039; $#list) &amp;lt; 0 #wtyp := 0 &lt;br /&gt;
        exit 1 eval window($#wtyp, $#wlen, 1) * 2 / $#wlen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7121</id>
		<title>Programmer Guide/Macro Library/XPlot</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7121"/>
		<updated>2014-05-20T13:16:08Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
&lt;br /&gt;
==XPlot : CObjEx==&lt;br /&gt;
&lt;br /&gt;
A general class for plotting multiple graphs.&lt;br /&gt;
&lt;br /&gt;
====XPlot Construction====&lt;br /&gt;
&lt;br /&gt;
Initialize a new XPlot-instance to display 1 or more graphs. Returns the new object or an empty string. Information and error messages are written to the &amp;lt;code&amp;gt;BSCRIPT CON&amp;lt;/code&amp;gt; console.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XPlot &amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of rows (default=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of columns for each row (inrow0 inrow1 ...). The default is one column per row.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The display window title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the graphics profile to use. A graphics profile is also known as a colour scheme.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The window position and size (in the format &#039;&amp;lt;code&amp;gt;x y width height&amp;lt;/code&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of an existing display item which should own this new window. See &amp;lt;code&amp;gt;NEW DISPLAY&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
A new &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; object if successful or an empty string.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; instance with one graph is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := xplot&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; Failed to create the xplot instance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====XPlot Member Functions====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class has the following member functions. See CObjEx Member Functions for a list of functions implemented in the parent class.&lt;br /&gt;
&lt;br /&gt;
=====AddPlot=====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; is identical to the &amp;lt;code&amp;gt;PLOT&amp;lt;/code&amp;gt; function, except that it adds to an existing graph (in addition to or on top of the original plot). If no graph exists at the specified &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;, then the call is passed to &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Add an x/y plot to an existing plot as defined by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. For example, plot a function over an existing spectrogram. See [[#Plot|PLOT]] for details.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
See [[#Plot|PLOT]] for parameter details.&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Add an x/y plot to an existing plot as defined by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. For example, plot a function over an existing spectrogram.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See [[#Plot|PLOT]] for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======PARAMETER======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter function in an existing graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; PARAMETER ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
===Dialog===&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;Dialog&amp;lt;/code&amp;gt; can be used to show and hide a dialog in the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; display.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog &amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The ID of the current or new dialog item or an empty string.&lt;br /&gt;
&lt;br /&gt;
======New======&lt;br /&gt;
&lt;br /&gt;
Creates a new dialog item (deleting the old one first).&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog New&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Delete======&lt;br /&gt;
&lt;br /&gt;
Removes the dialog from the display and deletes the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Msg======&lt;br /&gt;
&lt;br /&gt;
Posts a message to the macro message queue. The format of the message is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgId&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgPar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when the display is closed, this function is called to post the message &amp;lt;code&amp;gt;MENU dialogItem CLOSE&amp;lt;/code&amp;gt; to the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Msg ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message ID.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message parameters.&lt;br /&gt;
&lt;br /&gt;
======On|Enabled======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog On; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Enabled; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Off|Hidden======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Off ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Hidden ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Display===&lt;br /&gt;
&lt;br /&gt;
Returns the ID of the display object associated with this &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; display&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns the display object of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
===End===&lt;br /&gt;
&lt;br /&gt;
Enters the message loop, waits until the user closes the plot display and then destroys itself.&lt;br /&gt;
&lt;br /&gt;
===Get===&lt;br /&gt;
&lt;br /&gt;
Retrieve an attribute from a specific graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Get &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of the requested attribute. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;CURSORPOSITION&amp;lt;/code&amp;gt; - Returns the current cursor positions in the following format: &amp;lt;code&amp;gt;i1 x1 y1 i2 x2 y2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that &amp;lt;code&amp;gt;x1 &amp;lt;= x2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;YDATA&amp;lt;/code&amp;gt; - Returns the y data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;XDATA&amp;lt;/code&amp;gt; - Returns the x data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;RANGE&amp;lt;/code&amp;gt; - Returns the x axis and y axis range in the following format: &amp;lt;code&amp;gt;xmin xmax ymin ymax&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; - Returns the plot type (see &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; for a list of available plot types).&lt;br /&gt;
&lt;br /&gt;
===GetFColors===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GetFColors&amp;lt;/code&amp;gt; function returns a blank separated list of the function colors defined in the selected graphics profile.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; GetFColors&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns a blank separated list of color keywords.&lt;br /&gt;
&lt;br /&gt;
===Graph===&lt;br /&gt;
&lt;br /&gt;
Returns the requested attribute &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; of the graph identified by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Graph &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; [; &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;=GRAPH ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of a graph item, an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XGraph : CObjEx|XGRAPH]]&amp;lt;/code&amp;gt; instance or the &#039;&amp;lt;code&amp;gt;row column&amp;lt;/code&amp;gt;&#039; address of a splitter in the display. Note that the &amp;lt;code&amp;gt;row&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;column&amp;lt;/code&amp;gt; indices are zero-based.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The attribute to returned. The following values are allowed:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;INSTANCE&amp;lt;/code&amp;gt; - Return the id of the &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; instance associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GRAPH&amp;lt;/code&amp;gt; - Return the id of the graph object associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. This is the default attribute.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ROW&amp;lt;/code&amp;gt; - Return the row index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;COLUMN&amp;lt;/code&amp;gt; - Return the column index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return values are selected by the argument &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;. See the description of &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; for details. If the address argument &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; do not refer to a graph, &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; or splitter of the display, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Get the graph item id for the top left graph.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#graph := $#xplot graph 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Legend===&lt;br /&gt;
&lt;br /&gt;
Display a graph legend. Use &amp;lt;code&amp;gt;$#xplot LEGEND $#graph&amp;lt;/code&amp;gt; to clear the legend.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Legend &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;w&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;h&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text1&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text2&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph address (e.g. row and column index. See [[#Plot|PLOT]] for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit for size and position values. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt; - The real x/y values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;percent&amp;lt;/code&amp;gt; - The percent of the graph&#039;s plot area.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x, y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The position of the upper right corner of the first legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;w, h&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width and height of one legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The legend text color.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This flag selects the line attributes to be displayed. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt; - The color.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; - The color, style, width and symbol.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text for the legend for function X. If no text is supplied, the legend line is removed.This parameter can be either a string, or a simple table.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
void&lt;br /&gt;
&lt;br /&gt;
===Plot===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; can be used to plot a function in a graph. Currently, {{STX}} supports waveform , x/y (aka function and more specifically parameter), spectrogram and waterfall plots.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Plot an x/y function graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see the member function [[#Graph|GRAPH]] for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis data (a vector or an array).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data to be used for the x axis. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:A data vector with &amp;lt;code&amp;gt;y[!nrow]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. This is the default and means that the x axis uses the values &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:A blank separated list of values (&#039;x1 x2&#039; -&amp;gt; x[i] = x1+(x2-x1)/(y[!nrow]-1), i = 0..&amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be displayed in this plot.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The x axis display range. This can be one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xmin xmax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the x axis unit (e.g. &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;). The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt; plot only allows the following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the x axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ymin ymax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the y axis unit (e.g. &amp;lt;code&amp;gt;dB&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the y axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; argument (see &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; for details) or a zero-based function line index as specified in a color scheme (see Color Schemes in the User Guide).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xlabtab, ylabtab, zlabtab&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Extended tables containing the scale, grid and label definitions. For a description of the table format, please see the scale definition table for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Plot a simple x/y function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := XPLOT 1 ; 1 ; XPLOT ; Default ; 0 0 400 400&lt;br /&gt;
$#xplot plot 0 ; XYPLOT; $(eval fill(10, 0, 1)) ; * ; xyplot ; * ; ; x-axis ; * ; ; y-axis&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Plot a function graph. Note that this is identical to an &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y ; x ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter descriptions.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======parameter======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter graph. A parameter graph differs from a function graph because a parameter plot can have missing values - it does not necessarily have values for every point on the x axis.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; parameter ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======spectrogram======&lt;br /&gt;
&lt;br /&gt;
Plot a spectrogram graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; spectrogram ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A data array containing one spectrum or function line per &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; row. Note that this parameter is specific to the &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WATERFALL&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y-scale data (frequency). This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:1) &amp;lt;code&amp;gt;vData&amp;lt;/code&amp;gt; - A data vector with &amp;lt;code&amp;gt;y[!ncol]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:2) * - An asterisk: &amp;lt;code&amp;gt;y[i] = i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;. This is the default.&lt;br /&gt;
&lt;br /&gt;
:3) &amp;lt;code&amp;gt;y1 y2&amp;lt;/code&amp;gt; - Two blank separated values: &amp;lt;code&amp;gt;y[i] = y1+i*(y2-y1)/(d[!ncol]-1)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z scale is a color scale. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zdown&amp;lt;/code&amp;gt; - A numerical value. The maximum z value is chosen automatically and the minimum value is calculated as follows: &amp;lt;code&amp;gt;zmax-zdown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WATERFALL======&lt;br /&gt;
&lt;br /&gt;
Plot a waterfall graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WATERFALL ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zlabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data array (one spectrum or function-line / row).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z axis display range. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the z axis unit (e.g. &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the z axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the x scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the y scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of lines to be plotted. The default is &amp;lt;code&amp;gt;150&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WAVEFORM======&lt;br /&gt;
&lt;br /&gt;
Plot a waveform graph. Note that the displayed wave item is automatically attached to the graph. This means, no explicit call to &amp;lt;code&amp;gt;SetWave&amp;lt;/code&amp;gt; is necessary.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WAVEFORM ; &amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;XWAVE&amp;lt;/code&amp;gt; instance&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit to use on the x axis. The following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum waveform amplitude. This can be a value between 0 and ...&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be any positive number. The default is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the waveform envelope should be filled or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======TEXTBOX======&lt;br /&gt;
&lt;br /&gt;
Plot a graph containing text.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; TEXTBOX ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text color. This can be an of the {{STX}} color arguments.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The horizontal text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The vertical text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TOP&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BOTTOM&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text to be displayed. This can be a simple table with an entry per line of text or a semi-colon separated list of text lines.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======fstyle======&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;fstyle&amp;lt;/var&amp;gt; argument passed to the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; functions &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; has the following syntax and components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Determines whether the function line is solid (&amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt;), dotted (&amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt;) or dashed (&amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt;). The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line on screen. This can be any {{STX}} colour keyword or RGB value. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line when printing. See &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; for details. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width of the function line. Possible values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The style to use to draw the function. Each function point can be plotted separately (&amp;lt;code&amp;gt;POINTS&amp;lt;/code&amp;gt;), a line can be drawn between each function point (&amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;), the area below the function can be filled with the &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;AREA&amp;lt;/code&amp;gt;), the function points can be joined by steps (&amp;lt;code&amp;gt;STEPS&amp;lt;/code&amp;gt; - note that this is only available for the &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plot) or no points are plotted (&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; - this is best used when a drawing symbol (&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;) is defined). The default style is &amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The symbol to draw at each point. This can be used in conjunction with a drawing style (see &amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;). The following keywords are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;SQUARE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TRIANGLE|CIRCLE|CROSS|DIAMOND&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The default style is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value to use for missing y values. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not specified (empty) all values are displayed, otherwise all points where &amp;lt;code&amp;gt;y=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; are not displayed. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not empty and is not a number then &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. If no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is defined, no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is used (this is the default).&lt;br /&gt;
&lt;br /&gt;
===Redraw===&lt;br /&gt;
&lt;br /&gt;
Redraw the selected graph. This is currently only implemented for the &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; REDRAW &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for details).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return 0 if successful.&lt;br /&gt;
&lt;br /&gt;
===ScaleOctave===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Create a scale definition table for a logarithmic frequency axis with 2000 points at 10 Hz intervals and a maximum frequency of 10000 Hz.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$(xplot scaleOctave 10 2000; 10000)&#039; #xmin #xmax #xlab #x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also ScaleSteps.&lt;br /&gt;
&lt;br /&gt;
===ScaleLog10===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleSteps&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===ScaleSteps===&lt;br /&gt;
&lt;br /&gt;
Generate a linear scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically, e.g. &#039;&amp;lt;code&amp;gt;xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;min, max&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The label distance in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the major grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between major ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the minor grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between minor ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;min max labTab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;max&amp;lt;/code&amp;gt; are is the computed or corrected scale range and &amp;lt;code&amp;gt;labTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Calculate the linear scale, grid and labels for an amplitude axis between -70 and -10 dB with labels every 10 dB, major grid lines and ticks every 5dB and minor grid lines and ticks every dB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$($#xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1)&#039; #ymin #ymax #ylab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleLog10&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Set===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; function sets the cursor mode and text attributes.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Set [ &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;|* ; ] &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xgraph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An xgraph instance on which to call the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command. If no graph is specified or an asterisk, then the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command is carried out on all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:One of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt; - turn cursors on and off and change the way they look.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xunit&amp;lt;/code&amp;gt; - the name of the x-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;yunit&amp;lt;/code&amp;gt; - the name of the y-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xtext&amp;lt;/code&amp;gt; - the description of the x-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ytext&amp;lt;/code&amp;gt; - the description of the y-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; - the graph&#039;s title&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value of &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; depends on &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;mode|* type|* line|*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Where mode is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt; - show the cursor&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; - hide the cursor&lt;br /&gt;
&lt;br /&gt;
:Where &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;vbarcross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;harmonic&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:And &amp;lt;code&amp;gt;line&amp;lt;/code&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; |&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is not &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is used as the text, unit or title.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetCallback===&lt;br /&gt;
&lt;br /&gt;
The callback function is called by the message handlers to process popup and context menu messages and hotkeys which are not used by &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt;. The following commands are used to call the callback function:&lt;br /&gt;
&lt;br /&gt;
If called from an &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xgraphinstance irow icol msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If called from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xplotinstance * * msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetCallback [ &amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the callback function or an empty string to remove a previous association.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetWave===&lt;br /&gt;
&lt;br /&gt;
Attach a signal to one graph or all graphs (see &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;). If a wave item is attached to a graph, it can not be deleted before it is detached or the graph or &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance is deleted.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function Graph for details). If this parameter is omitted, then the wave item is set for all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XWave : CObjEx|XWAVE]]&amp;lt;/code&amp;gt; instance (or empty to remove attachment).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
Note that wave items can only be attached to graphs of type &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt;.====XPlot Hotkeys====&lt;br /&gt;
&lt;br /&gt;
The following hotkeys are implemented in the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Turn the cursors on and off.&lt;br /&gt;
|-&lt;br /&gt;
|S&lt;br /&gt;
|Change to the next cursor style.&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Turn cursor binding on and off.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+N&lt;br /&gt;
|Bind the cursor to the next function.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+P&lt;br /&gt;
|Bind the cursor to the previous function.&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|Turn the cursor rubberline on and off.&lt;br /&gt;
|-&lt;br /&gt;
|T&lt;br /&gt;
|Turn the title on and off.&lt;br /&gt;
|-&lt;br /&gt;
|X&lt;br /&gt;
|Change to the next x&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Y&lt;br /&gt;
|Change to the next y&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Z&lt;br /&gt;
|Change to the next z&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Space&lt;br /&gt;
|Open the setup dialog.&lt;br /&gt;
|-&lt;br /&gt;
|P&lt;br /&gt;
|Play the attached wave (between the cursors).&lt;br /&gt;
|-&lt;br /&gt;
|Q&lt;br /&gt;
|Play the attached wave (the whole signal).&lt;br /&gt;
|-&lt;br /&gt;
|ESC&lt;br /&gt;
|Stop playback.&lt;br /&gt;
|-&lt;br /&gt;
|Ins&lt;br /&gt;
|Show the selected metasegment&#039;s settings in a dialog or, if no metasegment is selected, show a dialog to create a new metasegment.&lt;br /&gt;
|-&lt;br /&gt;
|Del&lt;br /&gt;
|Delete the selected metasegments.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+Left Click&lt;br /&gt;
|Move the legend to the clicked position.&lt;br /&gt;
|-&lt;br /&gt;
|Shift+Left Click&lt;br /&gt;
|Create a metasegment at the clicked position (show the &#039;Insert Metasegment&#039; dialog).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XPlot Examples====&lt;br /&gt;
&lt;br /&gt;
=====Simple XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates simple &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; usage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro xplot_example_1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display (and graph)&lt;br /&gt;
    //&lt;br /&gt;
    #xplot := xplot 2 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
    if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
    //&lt;br /&gt;
    // plot graphs (including data generation)&lt;br /&gt;
    //&lt;br /&gt;
    #nValues := 100&lt;br /&gt;
    $#xplot Plot 0 0 ; XYPLOT ; $(eval fill($#nValues,1,1)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    $#xplot Plot 1 0 ; SPECTROGRAM ; $(eval rand(1,100,100)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    // the clean up takes place automatically&lt;br /&gt;
    // when the plot window is closed&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Plot rows of a matrix using XPLOT=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates how to plot the rows of a matrix using the &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//{{3.9 6473}{2009.01.29  16.44.04} - automatically created version information - do not change or delete this line}&lt;br /&gt;
&lt;br /&gt;
[macro xplot_example_2]&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      This row demonstrates how to plot each row of a matrix&lt;br /&gt;
//&lt;br /&gt;
//      C.G. 29.1.2009&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create display (and graph)&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#xplot := xplot 1 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create a matrix and fill it with some meaningless data&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#mat := new table * /Parameter * number:X:100&lt;br /&gt;
if &#039;$#mat[?]&#039; != table em -1 ; cannot create table ($emsg)&lt;br /&gt;
&lt;br /&gt;
for #i := 0 to $#i &amp;lt; 10 step #i := int $#i + 1&lt;br /&gt;
        $#mat[$#i,*] := eval fill( 100, $#i+1, $#i+1 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// plot each row of the matrix&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
for #i := int 0 to $#i &amp;lt; $#mat[!nrow] step #i := int $#i + 1&lt;br /&gt;
        #x := eval $#mat[$#i,*]&lt;br /&gt;
        $#xplot AddPlot 0 0 ; XYPLOT ; $#x ; * ; row-by-row plot ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Advanced XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
This example not only demonstrates the use of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class, but also signal processing using the &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
//      &lt;br /&gt;
//      DSP Examples&lt;br /&gt;
//      &lt;br /&gt;
//      last update:    Nov 17, 2007 (AN)&lt;br /&gt;
//      {{STX}} version:    {{STX}} 3.8 Beta&lt;br /&gt;
//&lt;br /&gt;
//      The examples in this file demonstrates how to ...&lt;br /&gt;
//              ...     use the EVAL command for signal processing&lt;br /&gt;
//              ...     use the class XWAVE     to read a signal frame by frame&lt;br /&gt;
//              ...     display spectrograms, waveforms and functions in XPLOT graphs&lt;br /&gt;
//              ...     enable XPLOT to play signals&lt;br /&gt;
//              ...     use the XPLOT callback function to implement simple user controls&lt;br /&gt;
//              ...     set and get cursor attritbutes and positions of XPLOT graphs&lt;br /&gt;
//              ...     add a legend to a XPLOT graph&lt;br /&gt;
//              ... use BUTIL MSGBOX for simple dialogs&lt;br /&gt;
//              ...     use the CON object (class BScript) to display log. messages&lt;br /&gt;
//              ...     use the CON object to save numeric tables to textfiles&lt;br /&gt;
//              ...     simulate item messages using the message queue macro MSGQUEUE&lt;br /&gt;
//              ...     implement and call local subroutines&lt;br /&gt;
//&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExAvrSpectrum                Create a plot containing the average spectra of all segments selected&lt;br /&gt;
//                                                      in the DataSet view.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExAvrSpectrum #lfrm=100ms&#039;;&#039;#sfrm=50%&#039;;&#039;#wtyp=hamming&#039;;&#039;#ascale=dB&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming, ...)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      create the result table (one spectrum per row)&lt;br /&gt;
#asp := new table * * num:x:$#segments[] /p&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
#nok := 0       //      number of computed average spectra&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
        con log process segment &amp;quot;set=$#aset, id=$#aseg, ch=$#ach&amp;quot; ($(int $#i+1) of $#segments[])&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        //      usage: XWAVE setref ; segmentid ; channel ; mode ; framelength ; frameshift ; ampmax ; ampref&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        //      set / check sampling rate&lt;br /&gt;
        else if &#039;$#srate&#039; == &#039;&#039; then&lt;br /&gt;
                #srate := $($#wave srate)       &lt;br /&gt;
        else if $($#wave srate) != $#srate then&lt;br /&gt;
                butil &#039;msgbox msg; segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; - sampling rate mismatch; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        //      compute the average spectrum&lt;br /&gt;
        if $(#tmp := dspexlib averagespectrum $#wave ; $#wtyp ; $#ascale)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute average spectrum of segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
                &lt;br /&gt;
        $#asp[*,$#nok] := $#tmp                                 //      save the spectrum&lt;br /&gt;
        delete $#tmp                                                    //      delete temp. buffer&lt;br /&gt;
        #legend := &#039;$#legend $($#wave title);&#039;  //      add segment to legend string&lt;br /&gt;
        $#wave destroy                                                  //      delete wave object&lt;br /&gt;
        #nok := int $#nok+1                                             //      increment result vector counter&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      exit if no results are computed&lt;br /&gt;
if $#nok &amp;lt; 1 exit &lt;br /&gt;
&lt;br /&gt;
//      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
readstr &#039;$(dspexlib frequencyscale $#srate ; $#asp[!nrow] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
//      create and configure the plot object&lt;br /&gt;
//      usage: XPLOT rows ; cols0 cols1 .. ; windowtitle ; graphicprofile ; wx wy wwidth wheight&lt;br /&gt;
#plot := xplot 1; 1; Average Spectrum; Rainbow; 0 0 1024 800&lt;br /&gt;
&lt;br /&gt;
//      plot all spectra and display the legend&lt;br /&gt;
#title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; $#df&lt;br /&gt;
readstr &#039;$(dspexlib amplitudescale $#ascale)&#039; #ytext #yunit&lt;br /&gt;
//      usage: xplot PLOT row col; FUNCTION; ydata; xdata; title; xrange; xunit; xtext; yrange; yunit; yrange&lt;br /&gt;
$#plot plot 0; function; $#asp; $#frq; $#title; ; $#funit; frequency; ; $#yunit ; $#ytext&lt;br /&gt;
$#plot legend 0; %; 50; 95; 45; 5; black; color; $#legend&lt;br /&gt;
$#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
$#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
//      wait until plot window is closed &lt;br /&gt;
$#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
//      finished - cleanup and and exit&lt;br /&gt;
delete $#asp $#frq $#segments   //      delete data items&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExSpectrogram                Plot a spectrogram of all segments selected in the DataSet view.&lt;br /&gt;
//                                                      For each segment one spectrogram window is displayed. The window&lt;br /&gt;
//                                                      must be closed before the next segment is analysed.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExSpectrogram #lfrm=40ms&#039;;&#039;#sfrm=10%&#039;;&#039;#wtyp=hamming&#039;;&#039;#arange=50&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming)&lt;br /&gt;
//                              #arange         spectrogram display range in dB (max .. max-range)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode variable to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] &amp;amp;&amp;amp; &#039;$DSPExMode&#039; != &#039;&#039; step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute the spectrogram&lt;br /&gt;
        if $(#asp := dspexlib spectrogram $#wave ; $#wtyp ; log)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute spectrogram of segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
        readstr &#039;$(dspexlib frequencyscale $($#wave srate) ; $#asp[!ncol] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
        //      create and configure the plot object&lt;br /&gt;
        #plot := xplot 2; 1 1; $($#wave title)   quit = c-q, next = c-n; Rainbow; 0 0 1024 800&lt;br /&gt;
        $($#plot display) height 3 1 /apply             //      set height of graphs&lt;br /&gt;
&lt;br /&gt;
        //      plot spectrogram and waveform&lt;br /&gt;
        #title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, arange=%s, amax=%.1fdB, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; &#039;$#arange&#039; $(eval max($#asp)) $#df&lt;br /&gt;
        $#plot plot 0; spectrogram; $#asp; $#frq; $#title; $($#wave tbegin) $($#wave tend); s; time; ; $#funit; frequency; $#arange&lt;br /&gt;
        $#plot plot 1; waveform; $#wave; ; s; time; $($#wave amax); $($#wave amax); amplitude; 1&lt;br /&gt;
        $#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
        $#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
        //      assign wave object to xplot graphs (for playback)&lt;br /&gt;
        $#plot setwave $#wave &lt;br /&gt;
&lt;br /&gt;
        //      wait until plot window is closed &lt;br /&gt;
        $#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
        //      cleanup&lt;br /&gt;
        delete $#asp $#frq              //      delete data items&lt;br /&gt;
        $#wave destroy                  //      delete wave object&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      finished - cleanup and exit&lt;br /&gt;
delete $#segments       //      delete segment table&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExCallback                   Callback function for XPLOT.&lt;br /&gt;
//&lt;br /&gt;
//      arguments:&lt;br /&gt;
//              if called from xplotobject message handler      -&amp;gt;   &#039;CALLBACK xplotobject * * msgid msgpar&#039;                   &lt;br /&gt;
//              if called from xgraphobject message handler     -&amp;gt;   &#039;CALLBACK xgraphobject row col msgid msgpar&#039;&lt;br /&gt;
//&lt;br /&gt;
//      Note: This macro uses the shell variable DSPEXMODE to check which macro has installed the &lt;br /&gt;
//      callback and to set return values.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExCallback #obj #row #col #msgid #msgpar]&lt;br /&gt;
&lt;br /&gt;
//      get xplot-object if called from a xgraph-object&lt;br /&gt;
if &#039;$#obj[!class]&#039; == xgraph #obj := $#obj get xplot&lt;br /&gt;
&lt;br /&gt;
//      message filter for keystroke messages&lt;br /&gt;
&lt;br /&gt;
//      process Control-Q (QUIT) key&lt;br /&gt;
if &#039;$#msgid$#msgpar&#039; == keyCQ then&lt;br /&gt;
&lt;br /&gt;
        if $(butil msgbox yesno; Quit ?; $DSPExMode) == yes then&lt;br /&gt;
                //      place the display-close message in the message queue to end the xplot message loop&lt;br /&gt;
                msgqueue &#039;display $($#obj display) close&#039;&lt;br /&gt;
                //      set mode variable to empty-string if C-Q key was pressed&lt;br /&gt;
                DSPExMode := &#039;&#039;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-C (COPY) and Control-S (SAVE) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCC keyCS) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0 (later used to retrieve data)&lt;br /&gt;
        #obj := $#obj graph 0; instance&lt;br /&gt;
&lt;br /&gt;
        //      select the data to be saved and the save format&lt;br /&gt;
        #todo := butil msgbox userdefined Amp Frq+Amp Cancel;; $DSPExMode - $(word $#i &#039;Copy to Clipboard&#039; &#039;Save to CSV-File&#039;) &lt;br /&gt;
        if $#todo == Amp then&lt;br /&gt;
                #table := eval $($#obj get ydata)       //      use eval to get a copy of y-data&lt;br /&gt;
        else if $#todo == Frq+Amp then&lt;br /&gt;
                if &#039;$DSPExMode&#039; == DSPExAvrSpectrum then&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , $($#obj get ydata) ) // merge x- and y-data into one table&lt;br /&gt;
                else&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , trn($($#obj get ydata)) ) // merge x- and transposed y-data into one table&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      copy / save if table exists&lt;br /&gt;
        if $#table[?] == table then&lt;br /&gt;
                //      select target&lt;br /&gt;
                if $#i == 0 then&lt;br /&gt;
                        #file := set clipboard  // set target to &amp;quot;clipboard&amp;quot; for all copy_xxx functions&lt;br /&gt;
                else&lt;br /&gt;
                        #file := butil filedialog save; Select Output File; ; CSV=CSV-File; TXT=Textfile        //      use filedialog to select the output file&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
                //      use the CON-object to copy/save table&lt;br /&gt;
                if &#039;$#file&#039; != &#039;&#039; con savedata text; $#table; $#file; 0; comma; dot&lt;br /&gt;
                delete $#table&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-I (INFO) || Control-M (MAX-MEAN) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCI keyCM) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0&lt;br /&gt;
        #obj := $#obj graph 0;inst&lt;br /&gt;
&lt;br /&gt;
        //      save original graph title&lt;br /&gt;
        if &#039;$GraphTitle&#039; == &#039;&#039; GraphTitle := $#obj get title&lt;br /&gt;
&lt;br /&gt;
        if $#i == 0 then&lt;br /&gt;
                //      get and display cursor positions&lt;br /&gt;
                readstr &#039;$($#obj get cursorposition)&#039; #i1 #x1 #y1 #i2 #x2 #y2 #&lt;br /&gt;
                #text := format &#039;Index = %d .. %d,  X = %g ... %g (%g),  Y = %g ... %g (%g)&#039; $#i1 $#i2 $#x1 $#x2 abs($#x1-$#x2) $#y1 $#y2 abs($#y1-$#y2)&lt;br /&gt;
        else&lt;br /&gt;
                //      set cursor mode (on), style (crosshair), rubberline (off), bind-mode (off), bind-functionindex (0)&lt;br /&gt;
                $#obj set cursormode on crosshair off off 0&lt;br /&gt;
                //      get x- and y-data&lt;br /&gt;
                #x := $#obj get xdata&lt;br /&gt;
                #y := $#obj get ydata&lt;br /&gt;
                //      find index of maximum y value &lt;br /&gt;
                #imax := eval imax($#y[*,0])&lt;br /&gt;
                //      compute mean of x and y&lt;br /&gt;
                #xavr := eval avr($#x)&lt;br /&gt;
                #yavr := eval avr($#y)&lt;br /&gt;
                //      set cursor 1 to maximum and cursor 2 to mean&lt;br /&gt;
                $#obj set cursorpos 1 $#x[$#imax] $#y[$#imax] deselect&lt;br /&gt;
                $#obj set cursorpos 2 $#xavr $#yavr deselect&lt;br /&gt;
                //      show maximum and mean in xgraph title&lt;br /&gt;
                #text := format &#039;Maximum( %g , %g ), Average( %g , %g )&#039; $#x[$#imax] $#y[$#imax] $#xavr $#yavr&lt;br /&gt;
        end&lt;br /&gt;
        //      show info in graph title&lt;br /&gt;
        $#obj set title $GraphTitle -- $#text&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      note: the return value of the callback function is not used by the xplot/xgraph message handler&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExLib                        Implements a set of signal processing functions which can be called with&lt;br /&gt;
//                                              &amp;quot;DSPLIBEXAMPLE functionname functionarguments&amp;quot;. This call style is often&lt;br /&gt;
//                                              used to reduce the number of macros of a script or application.&lt;br /&gt;
//&lt;br /&gt;
//      Functions:&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB GETSEGMENTS&lt;br /&gt;
//                      result: a list of all segments selected in the DataSet view stored in a simple&lt;br /&gt;
//                                      table (per line: &#039;setReference ; segmentId ; channelIndex&#039;)&lt;br /&gt;
//                      note:   this function shows an error message and terminates the caller if no segments&lt;br /&gt;
//                                      are selected&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AVERAGESPECTRUM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: an averaged fft spectrum in the selected format&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB SPECTROGRAM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                                                                                                      or COMPLEX&lt;br /&gt;
//                      result: a matrix of fft spectra in the selected format, one spectrum per line&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB FREQUENCYSCALE sr ; n ; type&lt;br /&gt;
//                      sr                      sampling rate in Hz&lt;br /&gt;
//                      n                       number of spectrum bins (equally spaced in the Hz domain)&lt;br /&gt;
//                      type            type of frequency scale:        HZ, KHZ, BARK, MEL, ERB&lt;br /&gt;
//                      result: &#039;frq unit df&#039;; frq is the frequency scale vector, unit is the frequency unit&lt;br /&gt;
//                                      name and df is the frequency scale step in Hz&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AMPLITUDESCALE type&lt;br /&gt;
//                      type            type of amplitude scale:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: &#039;name unit df&#039;; name and unit of amplitude scale&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExLib]&lt;br /&gt;
&lt;br /&gt;
//      function call dispatching&lt;br /&gt;
readvar #argv #fun #argv /d&lt;br /&gt;
goto fun$#fun noFun&lt;br /&gt;
&lt;br /&gt;
noFun:&lt;br /&gt;
//      function not implemented&lt;br /&gt;
//      result: empty string&lt;br /&gt;
&lt;br /&gt;
        //      show an error message and exit&lt;br /&gt;
        con log &#039;$#mac function &amp;quot;$#fun&amp;quot; not implemented&#039; &lt;br /&gt;
        exit 1 set &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funGetSegments: //      in:&lt;br /&gt;
                                //      out:    segment_list_table&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      retrieve list of selected segments from the DataSet application&lt;br /&gt;
        #segments := datasetcmd getselected segments&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table &amp;amp;&amp;amp; &#039;$#segments[]&#039; &amp;gt; 0 exit 1 set $#segments&lt;br /&gt;
        butil msgbox msg ; no segments selected - select and try again; Error!&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table delete $#segments&lt;br /&gt;
        exit 2 set &#039;&#039;   //      terminate this and the calling macro!&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAverageSpectrum:     //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                        //      out:    averagespectrum_vector&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      create result table &lt;br /&gt;
        #spg := new table * &lt;br /&gt;
&lt;br /&gt;
        //      compute averaged amplitude spectrum&lt;br /&gt;
        #n := $($#wave framecount)&lt;br /&gt;
        $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
        for #i := 1 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) ) + $#spg&lt;br /&gt;
        end&lt;br /&gt;
        $#spg := eval $#spg / $#n&lt;br /&gt;
&lt;br /&gt;
        //      convert to selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
        else if $#atyp == 2 then &lt;br /&gt;
                $#spg := eval $#spg ?^ 2&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return averaged spectrum&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funSpectrogram: //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                //      out:    spectrogram_matrix&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      check selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#wtyp&#039; dB logarithmic power amplitude linear complex) &amp;lt; 5 then&lt;br /&gt;
                //      compute amplitude or power spectra&lt;br /&gt;
        &lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength)/2 + 1) /p&lt;br /&gt;
                //      compute amplitude spectra&lt;br /&gt;
                #n := $($#wave framecount)&lt;br /&gt;
                for #i := 0 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                        if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
                end&lt;br /&gt;
                //      convert to selected output spectrum type&lt;br /&gt;
                if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                        $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
                else if $#atyp == 2 then &lt;br /&gt;
                        $#spg := eval $#spg ?^ 2&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        else&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
&lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength) + 2) /p&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
                for #i := int $($#wave framecount) to $#i &amp;gt; 0 step #i := int $#i-1&lt;br /&gt;
                        if $#i%50 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval fft ( $($#wave read) ?* $#w )&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return spectrogram matrix&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funFrequencyScale:      //      in:             samplingrate ; spectrumbins ; frequencyscale &lt;br /&gt;
                                        //      out:    frequencyscale_vector frequencyscale_unit frequency_resolution_Hz&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #sr&#039;;&#039;#n&#039;;&#039;#unit&#039;;&#039;#&lt;br /&gt;
        //      generate frequency scale equally spaced in Hz&lt;br /&gt;
        #frq := new table * // dummy table to make frq-scale permanent&lt;br /&gt;
        $#frq := eval fill($#n, 0, $(#df := eval $#sr / 2 / ($#n - 1)) )&lt;br /&gt;
        //      convert to selected scale&lt;br /&gt;
        if $(#unit := keyword &#039;$#unit&#039; Hz kHz Bark Mel ERB) &amp;lt; 0 #unit := 0&lt;br /&gt;
        if $(#unit := word $#unit Hz kHz Bark Mel ERB) == kHz then&lt;br /&gt;
                $#frq := eval $#frq / 1000&lt;br /&gt;
        else if $#unit != Hz then&lt;br /&gt;
                $#frq := eval hz2$#unit($#frq)&lt;br /&gt;
        end&lt;br /&gt;
        //      return scale settings&lt;br /&gt;
        exit 1 set &#039;$#frq $#unit $#df&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAmplitudeScale:      //      in:             amplitudescale &lt;br /&gt;
                                        //      out:    amplitudescale_text amplitudescale_unit&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #unit&#039;;&#039;#&lt;br /&gt;
        //      get text and unit of amplitude scale&lt;br /&gt;
        if $(#i := keyword &#039;$#unit&#039; dB logarithmic power amplitude linear) &amp;lt; 2 #i := 0&lt;br /&gt;
        #unit := word $#i dB dB - - -&lt;br /&gt;
        #text := word $#i amplitude amplitude power amplitude amplitude&lt;br /&gt;
        exit 1 set &#039;$#text $#unit&#039;&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      local subroutines&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
makeWindow:&lt;br /&gt;
        //      GOSUB MAKEWINDOW windowlength windowtype -&amp;gt; windowvector&lt;br /&gt;
        readvar #argv #wlen #wtyp # &lt;br /&gt;
        #list := hanning hamming blackman kaiser bartlett taprect nuttall flattop gauss&lt;br /&gt;
        if $(#wtyp := keyword &#039;$#wtyp&#039; $#list) &amp;lt; 0 #wtyp := 0 &lt;br /&gt;
        exit 1 eval window($#wtyp, $#wlen, 1) * 2 / $#wlen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7120</id>
		<title>Programmer Guide/Macro Library/XPlot</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7120"/>
		<updated>2014-05-20T13:03:07Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
&lt;br /&gt;
==XPlot : CObjEx==&lt;br /&gt;
&lt;br /&gt;
A general class for plotting multiple graphs.&lt;br /&gt;
&lt;br /&gt;
====XPlot Construction====&lt;br /&gt;
&lt;br /&gt;
Initialize a new XPlot-instance to display 1 or more graphs. Returns the new object or an empty string. Information and error messages are written to the &amp;lt;code&amp;gt;BSCRIPT CON&amp;lt;/code&amp;gt; console.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XPlot &amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of rows (default=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of columns for each row (inrow0 inrow1 ...). The default is one column per row.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The display window title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the graphics profile to use. A graphics profile is also known as a colour scheme.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The window position and size (in the format &#039;&amp;lt;code&amp;gt;x y width height&amp;lt;/code&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of an existing display item which should own this new window. See &amp;lt;code&amp;gt;NEW DISPLAY&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
A new &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; object if successful or an empty string.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; instance with one graph is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := xplot&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; Failed to create the xplot instance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====XPlot Member Functions====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class has the following member functions. See CObjEx Member Functions for a list of functions implemented in the parent class.&lt;br /&gt;
&lt;br /&gt;
=====AddPlot=====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; is a lot like &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;, but the functions are plotted in an existing graph (in addition to or on top of the original plot). If no graph exists at the specified &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;, then the call is passed to &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Add an x/y plot to an existing plot as defined by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. For example, plot a function over an existing spectrogram.&lt;br /&gt;
&lt;br /&gt;
Usage:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters:&lt;br /&gt;
&lt;br /&gt;
See [[#Plot|PLOT]] for parameter details.&lt;br /&gt;
&lt;br /&gt;
Result:&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Add an x/y plot to an existing plot as defined by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. For example, plot a function over an existing spectrogram.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See [[#Plot|PLOT]] for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======PARAMETER======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter function in an existing graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; PARAMETER ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
===Dialog===&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;Dialog&amp;lt;/code&amp;gt; can be used to show and hide a dialog in the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; display.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog &amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The ID of the current or new dialog item or an empty string.&lt;br /&gt;
&lt;br /&gt;
======New======&lt;br /&gt;
&lt;br /&gt;
Creates a new dialog item (deleting the old one first).&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog New&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Delete======&lt;br /&gt;
&lt;br /&gt;
Removes the dialog from the display and deletes the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Msg======&lt;br /&gt;
&lt;br /&gt;
Posts a message to the macro message queue. The format of the message is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgId&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgPar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when the display is closed, this function is called to post the message &amp;lt;code&amp;gt;MENU dialogItem CLOSE&amp;lt;/code&amp;gt; to the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Msg ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message ID.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message parameters.&lt;br /&gt;
&lt;br /&gt;
======On|Enabled======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog On; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Enabled; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Off|Hidden======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Off ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Hidden ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Display===&lt;br /&gt;
&lt;br /&gt;
Returns the ID of the display object associated with this &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; display&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns the display object of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
===End===&lt;br /&gt;
&lt;br /&gt;
Enters the message loop, waits until the user closes the plot display and then destroys itself.&lt;br /&gt;
&lt;br /&gt;
===Get===&lt;br /&gt;
&lt;br /&gt;
Retrieve an attribute from a specific graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Get &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of the requested attribute. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;CURSORPOSITION&amp;lt;/code&amp;gt; - Returns the current cursor positions in the following format: &amp;lt;code&amp;gt;i1 x1 y1 i2 x2 y2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that &amp;lt;code&amp;gt;x1 &amp;lt;= x2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;YDATA&amp;lt;/code&amp;gt; - Returns the y data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;XDATA&amp;lt;/code&amp;gt; - Returns the x data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;RANGE&amp;lt;/code&amp;gt; - Returns the x axis and y axis range in the following format: &amp;lt;code&amp;gt;xmin xmax ymin ymax&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; - Returns the plot type (see &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; for a list of available plot types).&lt;br /&gt;
&lt;br /&gt;
===GetFColors===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GetFColors&amp;lt;/code&amp;gt; function returns a blank separated list of the function colors defined in the selected graphics profile.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; GetFColors&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns a blank separated list of color keywords.&lt;br /&gt;
&lt;br /&gt;
===Graph===&lt;br /&gt;
&lt;br /&gt;
Returns the requested attribute &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; of the graph identified by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Graph &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; [; &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;=GRAPH ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of a graph item, an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XGraph : CObjEx|XGRAPH]]&amp;lt;/code&amp;gt; instance or the &#039;&amp;lt;code&amp;gt;row column&amp;lt;/code&amp;gt;&#039; address of a splitter in the display. Note that the &amp;lt;code&amp;gt;row&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;column&amp;lt;/code&amp;gt; indices are zero-based.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The attribute to returned. The following values are allowed:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;INSTANCE&amp;lt;/code&amp;gt; - Return the id of the &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; instance associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GRAPH&amp;lt;/code&amp;gt; - Return the id of the graph object associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. This is the default attribute.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ROW&amp;lt;/code&amp;gt; - Return the row index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;COLUMN&amp;lt;/code&amp;gt; - Return the column index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return values are selected by the argument &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;. See the description of &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; for details. If the address argument &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; do not refer to a graph, &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; or splitter of the display, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Get the graph item id for the top left graph.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#graph := $#xplot graph 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Legend===&lt;br /&gt;
&lt;br /&gt;
Display a graph legend. Use &amp;lt;code&amp;gt;$#xplot LEGEND $#graph&amp;lt;/code&amp;gt; to clear the legend.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Legend &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;w&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;h&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text1&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text2&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph address (e.g. row and column index. See [[#Plot|PLOT]] for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit for size and position values. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt; - The real x/y values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;percent&amp;lt;/code&amp;gt; - The percent of the graph&#039;s plot area.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x, y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The position of the upper right corner of the first legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;w, h&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width and height of one legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The legend text color.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This flag selects the line attributes to be displayed. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt; - The color.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; - The color, style, width and symbol.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text for the legend for function X. If no text is supplied, the legend line is removed.This parameter can be either a string, or a simple table.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
void&lt;br /&gt;
&lt;br /&gt;
===Plot===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; can be used to plot a function in a graph. Currently, {{STX}} supports waveform , x/y (aka function and more specifically parameter), spectrogram and waterfall plots.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Plot an x/y function graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see the member function [[#Graph|GRAPH]] for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis data (a vector or an array).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data to be used for the x axis. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:A data vector with &amp;lt;code&amp;gt;y[!nrow]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. This is the default and means that the x axis uses the values &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:A blank separated list of values (&#039;x1 x2&#039; -&amp;gt; x[i] = x1+(x2-x1)/(y[!nrow]-1), i = 0..&amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be displayed in this plot.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The x axis display range. This can be one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xmin xmax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the x axis unit (e.g. &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;). The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt; plot only allows the following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the x axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ymin ymax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the y axis unit (e.g. &amp;lt;code&amp;gt;dB&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the y axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; argument (see &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; for details) or a zero-based function line index as specified in a color scheme (see Color Schemes in the User Guide).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xlabtab, ylabtab, zlabtab&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Extended tables containing the scale, grid and label definitions. For a description of the table format, please see the scale definition table for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Plot a simple x/y function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := XPLOT 1 ; 1 ; XPLOT ; Default ; 0 0 400 400&lt;br /&gt;
$#xplot plot 0 ; XYPLOT; $(eval fill(10, 0, 1)) ; * ; xyplot ; * ; ; x-axis ; * ; ; y-axis&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Plot a function graph. Note that this is identical to an &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y ; x ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter descriptions.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======parameter======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter graph. A parameter graph differs from a function graph because a parameter plot can have missing values - it does not necessarily have values for every point on the x axis.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; parameter ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======spectrogram======&lt;br /&gt;
&lt;br /&gt;
Plot a spectrogram graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; spectrogram ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A data array containing one spectrum or function line per &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; row. Note that this parameter is specific to the &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WATERFALL&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y-scale data (frequency). This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:1) &amp;lt;code&amp;gt;vData&amp;lt;/code&amp;gt; - A data vector with &amp;lt;code&amp;gt;y[!ncol]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:2) * - An asterisk: &amp;lt;code&amp;gt;y[i] = i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;. This is the default.&lt;br /&gt;
&lt;br /&gt;
:3) &amp;lt;code&amp;gt;y1 y2&amp;lt;/code&amp;gt; - Two blank separated values: &amp;lt;code&amp;gt;y[i] = y1+i*(y2-y1)/(d[!ncol]-1)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z scale is a color scale. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zdown&amp;lt;/code&amp;gt; - A numerical value. The maximum z value is chosen automatically and the minimum value is calculated as follows: &amp;lt;code&amp;gt;zmax-zdown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WATERFALL======&lt;br /&gt;
&lt;br /&gt;
Plot a waterfall graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WATERFALL ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zlabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data array (one spectrum or function-line / row).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z axis display range. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the z axis unit (e.g. &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the z axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the x scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the y scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of lines to be plotted. The default is &amp;lt;code&amp;gt;150&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WAVEFORM======&lt;br /&gt;
&lt;br /&gt;
Plot a waveform graph. Note that the displayed wave item is automatically attached to the graph. This means, no explicit call to &amp;lt;code&amp;gt;SetWave&amp;lt;/code&amp;gt; is necessary.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WAVEFORM ; &amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;XWAVE&amp;lt;/code&amp;gt; instance&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit to use on the x axis. The following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum waveform amplitude. This can be a value between 0 and ...&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be any positive number. The default is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the waveform envelope should be filled or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======TEXTBOX======&lt;br /&gt;
&lt;br /&gt;
Plot a graph containing text.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; TEXTBOX ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text color. This can be an of the {{STX}} color arguments.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The horizontal text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The vertical text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TOP&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BOTTOM&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text to be displayed. This can be a simple table with an entry per line of text or a semi-colon separated list of text lines.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======fstyle======&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;fstyle&amp;lt;/var&amp;gt; argument passed to the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; functions &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; has the following syntax and components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Determines whether the function line is solid (&amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt;), dotted (&amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt;) or dashed (&amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt;). The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line on screen. This can be any {{STX}} colour keyword or RGB value. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line when printing. See &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; for details. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width of the function line. Possible values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The style to use to draw the function. Each function point can be plotted separately (&amp;lt;code&amp;gt;POINTS&amp;lt;/code&amp;gt;), a line can be drawn between each function point (&amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;), the area below the function can be filled with the &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;AREA&amp;lt;/code&amp;gt;), the function points can be joined by steps (&amp;lt;code&amp;gt;STEPS&amp;lt;/code&amp;gt; - note that this is only available for the &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plot) or no points are plotted (&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; - this is best used when a drawing symbol (&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;) is defined). The default style is &amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The symbol to draw at each point. This can be used in conjunction with a drawing style (see &amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;). The following keywords are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;SQUARE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TRIANGLE|CIRCLE|CROSS|DIAMOND&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The default style is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value to use for missing y values. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not specified (empty) all values are displayed, otherwise all points where &amp;lt;code&amp;gt;y=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; are not displayed. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not empty and is not a number then &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. If no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is defined, no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is used (this is the default).&lt;br /&gt;
&lt;br /&gt;
===Redraw===&lt;br /&gt;
&lt;br /&gt;
Redraw the selected graph. This is currently only implemented for the &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; REDRAW &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for details).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return 0 if successful.&lt;br /&gt;
&lt;br /&gt;
===ScaleOctave===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Create a scale definition table for a logarithmic frequency axis with 2000 points at 10 Hz intervals and a maximum frequency of 10000 Hz.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$(xplot scaleOctave 10 2000; 10000)&#039; #xmin #xmax #xlab #x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also ScaleSteps.&lt;br /&gt;
&lt;br /&gt;
===ScaleLog10===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleSteps&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===ScaleSteps===&lt;br /&gt;
&lt;br /&gt;
Generate a linear scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically, e.g. &#039;&amp;lt;code&amp;gt;xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;min, max&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The label distance in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the major grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between major ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the minor grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between minor ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;min max labTab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;max&amp;lt;/code&amp;gt; are is the computed or corrected scale range and &amp;lt;code&amp;gt;labTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Calculate the linear scale, grid and labels for an amplitude axis between -70 and -10 dB with labels every 10 dB, major grid lines and ticks every 5dB and minor grid lines and ticks every dB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$($#xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1)&#039; #ymin #ymax #ylab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleLog10&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Set===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; function sets the cursor mode and text attributes.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Set [ &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;|* ; ] &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xgraph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An xgraph instance on which to call the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command. If no graph is specified or an asterisk, then the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command is carried out on all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:One of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt; - turn cursors on and off and change the way they look.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xunit&amp;lt;/code&amp;gt; - the name of the x-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;yunit&amp;lt;/code&amp;gt; - the name of the y-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xtext&amp;lt;/code&amp;gt; - the description of the x-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ytext&amp;lt;/code&amp;gt; - the description of the y-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; - the graph&#039;s title&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value of &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; depends on &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;mode|* type|* line|*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Where mode is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt; - show the cursor&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; - hide the cursor&lt;br /&gt;
&lt;br /&gt;
:Where &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;vbarcross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;harmonic&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:And &amp;lt;code&amp;gt;line&amp;lt;/code&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; |&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is not &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is used as the text, unit or title.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetCallback===&lt;br /&gt;
&lt;br /&gt;
The callback function is called by the message handlers to process popup and context menu messages and hotkeys which are not used by &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt;. The following commands are used to call the callback function:&lt;br /&gt;
&lt;br /&gt;
If called from an &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xgraphinstance irow icol msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If called from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xplotinstance * * msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetCallback [ &amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the callback function or an empty string to remove a previous association.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetWave===&lt;br /&gt;
&lt;br /&gt;
Attach a signal to one graph or all graphs (see &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;). If a wave item is attached to a graph, it can not be deleted before it is detached or the graph or &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance is deleted.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function Graph for details). If this parameter is omitted, then the wave item is set for all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XWave : CObjEx|XWAVE]]&amp;lt;/code&amp;gt; instance (or empty to remove attachment).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
Note that wave items can only be attached to graphs of type &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt;.====XPlot Hotkeys====&lt;br /&gt;
&lt;br /&gt;
The following hotkeys are implemented in the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Turn the cursors on and off.&lt;br /&gt;
|-&lt;br /&gt;
|S&lt;br /&gt;
|Change to the next cursor style.&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Turn cursor binding on and off.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+N&lt;br /&gt;
|Bind the cursor to the next function.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+P&lt;br /&gt;
|Bind the cursor to the previous function.&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|Turn the cursor rubberline on and off.&lt;br /&gt;
|-&lt;br /&gt;
|T&lt;br /&gt;
|Turn the title on and off.&lt;br /&gt;
|-&lt;br /&gt;
|X&lt;br /&gt;
|Change to the next x&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Y&lt;br /&gt;
|Change to the next y&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Z&lt;br /&gt;
|Change to the next z&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Space&lt;br /&gt;
|Open the setup dialog.&lt;br /&gt;
|-&lt;br /&gt;
|P&lt;br /&gt;
|Play the attached wave (between the cursors).&lt;br /&gt;
|-&lt;br /&gt;
|Q&lt;br /&gt;
|Play the attached wave (the whole signal).&lt;br /&gt;
|-&lt;br /&gt;
|ESC&lt;br /&gt;
|Stop playback.&lt;br /&gt;
|-&lt;br /&gt;
|Ins&lt;br /&gt;
|Show the selected metasegment&#039;s settings in a dialog or, if no metasegment is selected, show a dialog to create a new metasegment.&lt;br /&gt;
|-&lt;br /&gt;
|Del&lt;br /&gt;
|Delete the selected metasegments.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+Left Click&lt;br /&gt;
|Move the legend to the clicked position.&lt;br /&gt;
|-&lt;br /&gt;
|Shift+Left Click&lt;br /&gt;
|Create a metasegment at the clicked position (show the &#039;Insert Metasegment&#039; dialog).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XPlot Examples====&lt;br /&gt;
&lt;br /&gt;
=====Simple XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates simple &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; usage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro xplot_example_1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display (and graph)&lt;br /&gt;
    //&lt;br /&gt;
    #xplot := xplot 2 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
    if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
    //&lt;br /&gt;
    // plot graphs (including data generation)&lt;br /&gt;
    //&lt;br /&gt;
    #nValues := 100&lt;br /&gt;
    $#xplot Plot 0 0 ; XYPLOT ; $(eval fill($#nValues,1,1)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    $#xplot Plot 1 0 ; SPECTROGRAM ; $(eval rand(1,100,100)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    // the clean up takes place automatically&lt;br /&gt;
    // when the plot window is closed&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Plot rows of a matrix using XPLOT=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates how to plot the rows of a matrix using the &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//{{3.9 6473}{2009.01.29  16.44.04} - automatically created version information - do not change or delete this line}&lt;br /&gt;
&lt;br /&gt;
[macro xplot_example_2]&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      This row demonstrates how to plot each row of a matrix&lt;br /&gt;
//&lt;br /&gt;
//      C.G. 29.1.2009&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create display (and graph)&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#xplot := xplot 1 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create a matrix and fill it with some meaningless data&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#mat := new table * /Parameter * number:X:100&lt;br /&gt;
if &#039;$#mat[?]&#039; != table em -1 ; cannot create table ($emsg)&lt;br /&gt;
&lt;br /&gt;
for #i := 0 to $#i &amp;lt; 10 step #i := int $#i + 1&lt;br /&gt;
        $#mat[$#i,*] := eval fill( 100, $#i+1, $#i+1 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// plot each row of the matrix&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
for #i := int 0 to $#i &amp;lt; $#mat[!nrow] step #i := int $#i + 1&lt;br /&gt;
        #x := eval $#mat[$#i,*]&lt;br /&gt;
        $#xplot AddPlot 0 0 ; XYPLOT ; $#x ; * ; row-by-row plot ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Advanced XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
This example not only demonstrates the use of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class, but also signal processing using the &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
//      &lt;br /&gt;
//      DSP Examples&lt;br /&gt;
//      &lt;br /&gt;
//      last update:    Nov 17, 2007 (AN)&lt;br /&gt;
//      {{STX}} version:    {{STX}} 3.8 Beta&lt;br /&gt;
//&lt;br /&gt;
//      The examples in this file demonstrates how to ...&lt;br /&gt;
//              ...     use the EVAL command for signal processing&lt;br /&gt;
//              ...     use the class XWAVE     to read a signal frame by frame&lt;br /&gt;
//              ...     display spectrograms, waveforms and functions in XPLOT graphs&lt;br /&gt;
//              ...     enable XPLOT to play signals&lt;br /&gt;
//              ...     use the XPLOT callback function to implement simple user controls&lt;br /&gt;
//              ...     set and get cursor attritbutes and positions of XPLOT graphs&lt;br /&gt;
//              ...     add a legend to a XPLOT graph&lt;br /&gt;
//              ... use BUTIL MSGBOX for simple dialogs&lt;br /&gt;
//              ...     use the CON object (class BScript) to display log. messages&lt;br /&gt;
//              ...     use the CON object to save numeric tables to textfiles&lt;br /&gt;
//              ...     simulate item messages using the message queue macro MSGQUEUE&lt;br /&gt;
//              ...     implement and call local subroutines&lt;br /&gt;
//&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExAvrSpectrum                Create a plot containing the average spectra of all segments selected&lt;br /&gt;
//                                                      in the DataSet view.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExAvrSpectrum #lfrm=100ms&#039;;&#039;#sfrm=50%&#039;;&#039;#wtyp=hamming&#039;;&#039;#ascale=dB&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming, ...)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      create the result table (one spectrum per row)&lt;br /&gt;
#asp := new table * * num:x:$#segments[] /p&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
#nok := 0       //      number of computed average spectra&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
        con log process segment &amp;quot;set=$#aset, id=$#aseg, ch=$#ach&amp;quot; ($(int $#i+1) of $#segments[])&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        //      usage: XWAVE setref ; segmentid ; channel ; mode ; framelength ; frameshift ; ampmax ; ampref&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        //      set / check sampling rate&lt;br /&gt;
        else if &#039;$#srate&#039; == &#039;&#039; then&lt;br /&gt;
                #srate := $($#wave srate)       &lt;br /&gt;
        else if $($#wave srate) != $#srate then&lt;br /&gt;
                butil &#039;msgbox msg; segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; - sampling rate mismatch; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        //      compute the average spectrum&lt;br /&gt;
        if $(#tmp := dspexlib averagespectrum $#wave ; $#wtyp ; $#ascale)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute average spectrum of segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
                &lt;br /&gt;
        $#asp[*,$#nok] := $#tmp                                 //      save the spectrum&lt;br /&gt;
        delete $#tmp                                                    //      delete temp. buffer&lt;br /&gt;
        #legend := &#039;$#legend $($#wave title);&#039;  //      add segment to legend string&lt;br /&gt;
        $#wave destroy                                                  //      delete wave object&lt;br /&gt;
        #nok := int $#nok+1                                             //      increment result vector counter&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      exit if no results are computed&lt;br /&gt;
if $#nok &amp;lt; 1 exit &lt;br /&gt;
&lt;br /&gt;
//      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
readstr &#039;$(dspexlib frequencyscale $#srate ; $#asp[!nrow] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
//      create and configure the plot object&lt;br /&gt;
//      usage: XPLOT rows ; cols0 cols1 .. ; windowtitle ; graphicprofile ; wx wy wwidth wheight&lt;br /&gt;
#plot := xplot 1; 1; Average Spectrum; Rainbow; 0 0 1024 800&lt;br /&gt;
&lt;br /&gt;
//      plot all spectra and display the legend&lt;br /&gt;
#title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; $#df&lt;br /&gt;
readstr &#039;$(dspexlib amplitudescale $#ascale)&#039; #ytext #yunit&lt;br /&gt;
//      usage: xplot PLOT row col; FUNCTION; ydata; xdata; title; xrange; xunit; xtext; yrange; yunit; yrange&lt;br /&gt;
$#plot plot 0; function; $#asp; $#frq; $#title; ; $#funit; frequency; ; $#yunit ; $#ytext&lt;br /&gt;
$#plot legend 0; %; 50; 95; 45; 5; black; color; $#legend&lt;br /&gt;
$#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
$#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
//      wait until plot window is closed &lt;br /&gt;
$#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
//      finished - cleanup and and exit&lt;br /&gt;
delete $#asp $#frq $#segments   //      delete data items&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExSpectrogram                Plot a spectrogram of all segments selected in the DataSet view.&lt;br /&gt;
//                                                      For each segment one spectrogram window is displayed. The window&lt;br /&gt;
//                                                      must be closed before the next segment is analysed.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExSpectrogram #lfrm=40ms&#039;;&#039;#sfrm=10%&#039;;&#039;#wtyp=hamming&#039;;&#039;#arange=50&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming)&lt;br /&gt;
//                              #arange         spectrogram display range in dB (max .. max-range)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode variable to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] &amp;amp;&amp;amp; &#039;$DSPExMode&#039; != &#039;&#039; step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute the spectrogram&lt;br /&gt;
        if $(#asp := dspexlib spectrogram $#wave ; $#wtyp ; log)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute spectrogram of segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
        readstr &#039;$(dspexlib frequencyscale $($#wave srate) ; $#asp[!ncol] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
        //      create and configure the plot object&lt;br /&gt;
        #plot := xplot 2; 1 1; $($#wave title)   quit = c-q, next = c-n; Rainbow; 0 0 1024 800&lt;br /&gt;
        $($#plot display) height 3 1 /apply             //      set height of graphs&lt;br /&gt;
&lt;br /&gt;
        //      plot spectrogram and waveform&lt;br /&gt;
        #title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, arange=%s, amax=%.1fdB, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; &#039;$#arange&#039; $(eval max($#asp)) $#df&lt;br /&gt;
        $#plot plot 0; spectrogram; $#asp; $#frq; $#title; $($#wave tbegin) $($#wave tend); s; time; ; $#funit; frequency; $#arange&lt;br /&gt;
        $#plot plot 1; waveform; $#wave; ; s; time; $($#wave amax); $($#wave amax); amplitude; 1&lt;br /&gt;
        $#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
        $#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
        //      assign wave object to xplot graphs (for playback)&lt;br /&gt;
        $#plot setwave $#wave &lt;br /&gt;
&lt;br /&gt;
        //      wait until plot window is closed &lt;br /&gt;
        $#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
        //      cleanup&lt;br /&gt;
        delete $#asp $#frq              //      delete data items&lt;br /&gt;
        $#wave destroy                  //      delete wave object&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      finished - cleanup and exit&lt;br /&gt;
delete $#segments       //      delete segment table&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExCallback                   Callback function for XPLOT.&lt;br /&gt;
//&lt;br /&gt;
//      arguments:&lt;br /&gt;
//              if called from xplotobject message handler      -&amp;gt;   &#039;CALLBACK xplotobject * * msgid msgpar&#039;                   &lt;br /&gt;
//              if called from xgraphobject message handler     -&amp;gt;   &#039;CALLBACK xgraphobject row col msgid msgpar&#039;&lt;br /&gt;
//&lt;br /&gt;
//      Note: This macro uses the shell variable DSPEXMODE to check which macro has installed the &lt;br /&gt;
//      callback and to set return values.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExCallback #obj #row #col #msgid #msgpar]&lt;br /&gt;
&lt;br /&gt;
//      get xplot-object if called from a xgraph-object&lt;br /&gt;
if &#039;$#obj[!class]&#039; == xgraph #obj := $#obj get xplot&lt;br /&gt;
&lt;br /&gt;
//      message filter for keystroke messages&lt;br /&gt;
&lt;br /&gt;
//      process Control-Q (QUIT) key&lt;br /&gt;
if &#039;$#msgid$#msgpar&#039; == keyCQ then&lt;br /&gt;
&lt;br /&gt;
        if $(butil msgbox yesno; Quit ?; $DSPExMode) == yes then&lt;br /&gt;
                //      place the display-close message in the message queue to end the xplot message loop&lt;br /&gt;
                msgqueue &#039;display $($#obj display) close&#039;&lt;br /&gt;
                //      set mode variable to empty-string if C-Q key was pressed&lt;br /&gt;
                DSPExMode := &#039;&#039;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-C (COPY) and Control-S (SAVE) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCC keyCS) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0 (later used to retrieve data)&lt;br /&gt;
        #obj := $#obj graph 0; instance&lt;br /&gt;
&lt;br /&gt;
        //      select the data to be saved and the save format&lt;br /&gt;
        #todo := butil msgbox userdefined Amp Frq+Amp Cancel;; $DSPExMode - $(word $#i &#039;Copy to Clipboard&#039; &#039;Save to CSV-File&#039;) &lt;br /&gt;
        if $#todo == Amp then&lt;br /&gt;
                #table := eval $($#obj get ydata)       //      use eval to get a copy of y-data&lt;br /&gt;
        else if $#todo == Frq+Amp then&lt;br /&gt;
                if &#039;$DSPExMode&#039; == DSPExAvrSpectrum then&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , $($#obj get ydata) ) // merge x- and y-data into one table&lt;br /&gt;
                else&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , trn($($#obj get ydata)) ) // merge x- and transposed y-data into one table&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      copy / save if table exists&lt;br /&gt;
        if $#table[?] == table then&lt;br /&gt;
                //      select target&lt;br /&gt;
                if $#i == 0 then&lt;br /&gt;
                        #file := set clipboard  // set target to &amp;quot;clipboard&amp;quot; for all copy_xxx functions&lt;br /&gt;
                else&lt;br /&gt;
                        #file := butil filedialog save; Select Output File; ; CSV=CSV-File; TXT=Textfile        //      use filedialog to select the output file&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
                //      use the CON-object to copy/save table&lt;br /&gt;
                if &#039;$#file&#039; != &#039;&#039; con savedata text; $#table; $#file; 0; comma; dot&lt;br /&gt;
                delete $#table&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-I (INFO) || Control-M (MAX-MEAN) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCI keyCM) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0&lt;br /&gt;
        #obj := $#obj graph 0;inst&lt;br /&gt;
&lt;br /&gt;
        //      save original graph title&lt;br /&gt;
        if &#039;$GraphTitle&#039; == &#039;&#039; GraphTitle := $#obj get title&lt;br /&gt;
&lt;br /&gt;
        if $#i == 0 then&lt;br /&gt;
                //      get and display cursor positions&lt;br /&gt;
                readstr &#039;$($#obj get cursorposition)&#039; #i1 #x1 #y1 #i2 #x2 #y2 #&lt;br /&gt;
                #text := format &#039;Index = %d .. %d,  X = %g ... %g (%g),  Y = %g ... %g (%g)&#039; $#i1 $#i2 $#x1 $#x2 abs($#x1-$#x2) $#y1 $#y2 abs($#y1-$#y2)&lt;br /&gt;
        else&lt;br /&gt;
                //      set cursor mode (on), style (crosshair), rubberline (off), bind-mode (off), bind-functionindex (0)&lt;br /&gt;
                $#obj set cursormode on crosshair off off 0&lt;br /&gt;
                //      get x- and y-data&lt;br /&gt;
                #x := $#obj get xdata&lt;br /&gt;
                #y := $#obj get ydata&lt;br /&gt;
                //      find index of maximum y value &lt;br /&gt;
                #imax := eval imax($#y[*,0])&lt;br /&gt;
                //      compute mean of x and y&lt;br /&gt;
                #xavr := eval avr($#x)&lt;br /&gt;
                #yavr := eval avr($#y)&lt;br /&gt;
                //      set cursor 1 to maximum and cursor 2 to mean&lt;br /&gt;
                $#obj set cursorpos 1 $#x[$#imax] $#y[$#imax] deselect&lt;br /&gt;
                $#obj set cursorpos 2 $#xavr $#yavr deselect&lt;br /&gt;
                //      show maximum and mean in xgraph title&lt;br /&gt;
                #text := format &#039;Maximum( %g , %g ), Average( %g , %g )&#039; $#x[$#imax] $#y[$#imax] $#xavr $#yavr&lt;br /&gt;
        end&lt;br /&gt;
        //      show info in graph title&lt;br /&gt;
        $#obj set title $GraphTitle -- $#text&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      note: the return value of the callback function is not used by the xplot/xgraph message handler&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExLib                        Implements a set of signal processing functions which can be called with&lt;br /&gt;
//                                              &amp;quot;DSPLIBEXAMPLE functionname functionarguments&amp;quot;. This call style is often&lt;br /&gt;
//                                              used to reduce the number of macros of a script or application.&lt;br /&gt;
//&lt;br /&gt;
//      Functions:&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB GETSEGMENTS&lt;br /&gt;
//                      result: a list of all segments selected in the DataSet view stored in a simple&lt;br /&gt;
//                                      table (per line: &#039;setReference ; segmentId ; channelIndex&#039;)&lt;br /&gt;
//                      note:   this function shows an error message and terminates the caller if no segments&lt;br /&gt;
//                                      are selected&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AVERAGESPECTRUM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: an averaged fft spectrum in the selected format&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB SPECTROGRAM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                                                                                                      or COMPLEX&lt;br /&gt;
//                      result: a matrix of fft spectra in the selected format, one spectrum per line&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB FREQUENCYSCALE sr ; n ; type&lt;br /&gt;
//                      sr                      sampling rate in Hz&lt;br /&gt;
//                      n                       number of spectrum bins (equally spaced in the Hz domain)&lt;br /&gt;
//                      type            type of frequency scale:        HZ, KHZ, BARK, MEL, ERB&lt;br /&gt;
//                      result: &#039;frq unit df&#039;; frq is the frequency scale vector, unit is the frequency unit&lt;br /&gt;
//                                      name and df is the frequency scale step in Hz&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AMPLITUDESCALE type&lt;br /&gt;
//                      type            type of amplitude scale:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: &#039;name unit df&#039;; name and unit of amplitude scale&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExLib]&lt;br /&gt;
&lt;br /&gt;
//      function call dispatching&lt;br /&gt;
readvar #argv #fun #argv /d&lt;br /&gt;
goto fun$#fun noFun&lt;br /&gt;
&lt;br /&gt;
noFun:&lt;br /&gt;
//      function not implemented&lt;br /&gt;
//      result: empty string&lt;br /&gt;
&lt;br /&gt;
        //      show an error message and exit&lt;br /&gt;
        con log &#039;$#mac function &amp;quot;$#fun&amp;quot; not implemented&#039; &lt;br /&gt;
        exit 1 set &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funGetSegments: //      in:&lt;br /&gt;
                                //      out:    segment_list_table&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      retrieve list of selected segments from the DataSet application&lt;br /&gt;
        #segments := datasetcmd getselected segments&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table &amp;amp;&amp;amp; &#039;$#segments[]&#039; &amp;gt; 0 exit 1 set $#segments&lt;br /&gt;
        butil msgbox msg ; no segments selected - select and try again; Error!&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table delete $#segments&lt;br /&gt;
        exit 2 set &#039;&#039;   //      terminate this and the calling macro!&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAverageSpectrum:     //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                        //      out:    averagespectrum_vector&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      create result table &lt;br /&gt;
        #spg := new table * &lt;br /&gt;
&lt;br /&gt;
        //      compute averaged amplitude spectrum&lt;br /&gt;
        #n := $($#wave framecount)&lt;br /&gt;
        $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
        for #i := 1 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) ) + $#spg&lt;br /&gt;
        end&lt;br /&gt;
        $#spg := eval $#spg / $#n&lt;br /&gt;
&lt;br /&gt;
        //      convert to selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
        else if $#atyp == 2 then &lt;br /&gt;
                $#spg := eval $#spg ?^ 2&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return averaged spectrum&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funSpectrogram: //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                //      out:    spectrogram_matrix&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      check selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#wtyp&#039; dB logarithmic power amplitude linear complex) &amp;lt; 5 then&lt;br /&gt;
                //      compute amplitude or power spectra&lt;br /&gt;
        &lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength)/2 + 1) /p&lt;br /&gt;
                //      compute amplitude spectra&lt;br /&gt;
                #n := $($#wave framecount)&lt;br /&gt;
                for #i := 0 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                        if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
                end&lt;br /&gt;
                //      convert to selected output spectrum type&lt;br /&gt;
                if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                        $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
                else if $#atyp == 2 then &lt;br /&gt;
                        $#spg := eval $#spg ?^ 2&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        else&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
&lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength) + 2) /p&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
                for #i := int $($#wave framecount) to $#i &amp;gt; 0 step #i := int $#i-1&lt;br /&gt;
                        if $#i%50 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval fft ( $($#wave read) ?* $#w )&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return spectrogram matrix&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funFrequencyScale:      //      in:             samplingrate ; spectrumbins ; frequencyscale &lt;br /&gt;
                                        //      out:    frequencyscale_vector frequencyscale_unit frequency_resolution_Hz&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #sr&#039;;&#039;#n&#039;;&#039;#unit&#039;;&#039;#&lt;br /&gt;
        //      generate frequency scale equally spaced in Hz&lt;br /&gt;
        #frq := new table * // dummy table to make frq-scale permanent&lt;br /&gt;
        $#frq := eval fill($#n, 0, $(#df := eval $#sr / 2 / ($#n - 1)) )&lt;br /&gt;
        //      convert to selected scale&lt;br /&gt;
        if $(#unit := keyword &#039;$#unit&#039; Hz kHz Bark Mel ERB) &amp;lt; 0 #unit := 0&lt;br /&gt;
        if $(#unit := word $#unit Hz kHz Bark Mel ERB) == kHz then&lt;br /&gt;
                $#frq := eval $#frq / 1000&lt;br /&gt;
        else if $#unit != Hz then&lt;br /&gt;
                $#frq := eval hz2$#unit($#frq)&lt;br /&gt;
        end&lt;br /&gt;
        //      return scale settings&lt;br /&gt;
        exit 1 set &#039;$#frq $#unit $#df&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAmplitudeScale:      //      in:             amplitudescale &lt;br /&gt;
                                        //      out:    amplitudescale_text amplitudescale_unit&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #unit&#039;;&#039;#&lt;br /&gt;
        //      get text and unit of amplitude scale&lt;br /&gt;
        if $(#i := keyword &#039;$#unit&#039; dB logarithmic power amplitude linear) &amp;lt; 2 #i := 0&lt;br /&gt;
        #unit := word $#i dB dB - - -&lt;br /&gt;
        #text := word $#i amplitude amplitude power amplitude amplitude&lt;br /&gt;
        exit 1 set &#039;$#text $#unit&#039;&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      local subroutines&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
makeWindow:&lt;br /&gt;
        //      GOSUB MAKEWINDOW windowlength windowtype -&amp;gt; windowvector&lt;br /&gt;
        readvar #argv #wlen #wtyp # &lt;br /&gt;
        #list := hanning hamming blackman kaiser bartlett taprect nuttall flattop gauss&lt;br /&gt;
        if $(#wtyp := keyword &#039;$#wtyp&#039; $#list) &amp;lt; 0 #wtyp := 0 &lt;br /&gt;
        exit 1 eval window($#wtyp, $#wlen, 1) * 2 / $#wlen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7119</id>
		<title>Programmer Guide/Macro Library/XPlot</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Macro_Library/XPlot&amp;diff=7119"/>
		<updated>2014-05-20T12:31:45Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
{{TOC limit|3}}&lt;br /&gt;
&lt;br /&gt;
==XPlot : CObjEx==&lt;br /&gt;
&lt;br /&gt;
A general class for plotting multiple graphs.&lt;br /&gt;
&lt;br /&gt;
====XPlot Construction====&lt;br /&gt;
&lt;br /&gt;
Initialize a new XPlot-instance to display 1 or more graphs. Returns the new object or an empty string. Information and error messages are written to the &amp;lt;code&amp;gt;BSCRIPT CON&amp;lt;/code&amp;gt; console.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;XPlot &amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;=1 ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;rows&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of rows (default=&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;columns&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of columns for each row (inrow0 inrow1 ...). The default is one column per row.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The display window title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;profile&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the graphics profile to use. A graphics profile is also known as a colour scheme.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;window&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The window position and size (in the format &#039;&amp;lt;code&amp;gt;x y width height&amp;lt;/code&amp;gt;&#039;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;owner&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of an existing display item which should own this new window. See &amp;lt;code&amp;gt;NEW DISPLAY&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
A new &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; object if successful or an empty string.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
The simplest way to create an &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; instance with one graph is as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := xplot&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; Failed to create the xplot instance&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
====XPlot Member Functions====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class has the following member functions. See CObjEx Member Functions for a list of functions implemented in the parent class.&lt;br /&gt;
&lt;br /&gt;
===AddPlot===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; is a lot like &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;, but the functions are plotted in an existing graph (in addition to or on top of the original plot). If no graph exists at the specified &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;, then the call is passed to &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Add an x/y plot to an existing plot as defined by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. For example, plot a function over an existing spectrogram.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See [[#Plot|PLOT]] for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Add an x/y plot to an existing plot as defined by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. For example, plot a function over an existing spectrogram.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See [[#Plot|PLOT]] for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======PARAMETER======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter function in an existing graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; AddPlot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; PARAMETER ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
===Dialog===&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;Dialog&amp;lt;/code&amp;gt; can be used to show and hide a dialog in the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; display.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog &amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cmd&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:See below for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The ID of the current or new dialog item or an empty string.&lt;br /&gt;
&lt;br /&gt;
======New======&lt;br /&gt;
&lt;br /&gt;
Creates a new dialog item (deleting the old one first).&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog New&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Delete======&lt;br /&gt;
&lt;br /&gt;
Removes the dialog from the display and deletes the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Msg======&lt;br /&gt;
&lt;br /&gt;
Posts a message to the macro message queue. The format of the message is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;MENU&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;dialogItem&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgId&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgPar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note that when the display is closed, this function is called to post the message &amp;lt;code&amp;gt;MENU dialogItem CLOSE&amp;lt;/code&amp;gt; to the dialog item.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Msg ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgid&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message ID.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;msgpar&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The message parameters.&lt;br /&gt;
&lt;br /&gt;
======On|Enabled======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog On; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Enabled; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
======Off|Hidden======&lt;br /&gt;
&lt;br /&gt;
Show the dialog and set it&#039;s position.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Off ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; Dialog Hidden ; &amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;pos&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the position of the dialog within the display. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ABOVE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BELOW&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Display===&lt;br /&gt;
&lt;br /&gt;
Returns the ID of the display object associated with this &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; display&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns the display object of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance.&lt;br /&gt;
&lt;br /&gt;
===End===&lt;br /&gt;
&lt;br /&gt;
Enters the message loop, waits until the user closes the plot display and then destroys itself.&lt;br /&gt;
&lt;br /&gt;
===Get===&lt;br /&gt;
&lt;br /&gt;
Retrieve an attribute from a specific graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Get &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attribute&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of the requested attribute. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;CURSORPOSITION&amp;lt;/code&amp;gt; - Returns the current cursor positions in the following format: &amp;lt;code&amp;gt;i1 x1 y1 i2 x2 y2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that &amp;lt;code&amp;gt;x1 &amp;lt;= x2&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;YDATA&amp;lt;/code&amp;gt; - Returns the y data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;XDATA&amp;lt;/code&amp;gt; - Returns the x data item.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;RANGE&amp;lt;/code&amp;gt; - Returns the x axis and y axis range in the following format: &amp;lt;code&amp;gt;xmin xmax ymin ymax&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;TYPE&amp;lt;/code&amp;gt; - Returns the plot type (see &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; for a list of available plot types).&lt;br /&gt;
&lt;br /&gt;
===GetFColors===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;GetFColors&amp;lt;/code&amp;gt; function returns a blank separated list of the function colors defined in the selected graphics profile.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; GetFColors&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Returns a blank separated list of color keywords.&lt;br /&gt;
&lt;br /&gt;
===Graph===&lt;br /&gt;
&lt;br /&gt;
Returns the requested attribute &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; of the graph identified by &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Graph &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; [; &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;=GRAPH ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The id of a graph item, an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XGraph : CObjEx|XGRAPH]]&amp;lt;/code&amp;gt; instance or the &#039;&amp;lt;code&amp;gt;row column&amp;lt;/code&amp;gt;&#039; address of a splitter in the display. Note that the &amp;lt;code&amp;gt;row&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;column&amp;lt;/code&amp;gt; indices are zero-based.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The attribute to returned. The following values are allowed:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;INSTANCE&amp;lt;/code&amp;gt; - Return the id of the &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; instance associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;GRAPH&amp;lt;/code&amp;gt; - Return the id of the graph object associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;. This is the default attribute.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ROW&amp;lt;/code&amp;gt; - Return the row index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;COLUMN&amp;lt;/code&amp;gt; - Return the column index of the splitter associated with &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return values are selected by the argument &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;. See the description of &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; for details. If the address argument &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; do not refer to a graph, &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; or splitter of the display, an empty string is returned.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Get the graph item id for the top left graph.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#graph := $#xplot graph 0 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
===Legend===&lt;br /&gt;
&lt;br /&gt;
Display a graph legend. Use &amp;lt;code&amp;gt;$#xplot LEGEND $#graph&amp;lt;/code&amp;gt; to clear the legend.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Legend &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;w&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;h&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text1&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text2&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph address (e.g. row and column index. See [[#Plot|PLOT]] for detail).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;unit&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit for size and position values. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;real&amp;lt;/code&amp;gt; - The real x/y values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;%&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;percent&amp;lt;/code&amp;gt; - The percent of the graph&#039;s plot area.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x, y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The position of the upper right corner of the first legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;w, h&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width and height of one legend line.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The legend text color.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;info&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This flag selects the line attributes to be displayed. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;color&amp;lt;/code&amp;gt; - The color.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; - The color, style, width and symbol.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;textX&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text for the legend for function X. If no text is supplied, the legend line is removed.This parameter can be either a string, or a simple table.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
void&lt;br /&gt;
&lt;br /&gt;
===Plot===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; function &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; can be used to plot a function in a graph. Currently, {{STX}} supports waveform , x/y (aka function and more specifically parameter), spectrogram and waterfall plots.&lt;br /&gt;
&lt;br /&gt;
======XYPLOT======&lt;br /&gt;
&lt;br /&gt;
Plot an x/y function graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; XYPLOT ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see the member function Graph for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis data (a vector or an array).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data to be used for the x axis. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:A data vector with &amp;lt;code&amp;gt;y[!nrow]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. This is the default and means that the x axis uses the values &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:A blank separated list of values (&#039;x1 x2&#039; -&amp;gt; x[i] = x1+(x2-x1)/(y[!nrow]-1), i = 0..&amp;lt;code&amp;gt;y[!nrow]-1&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be displayed in this plot.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The x axis display range. This can be one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xmin xmax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the x axis unit (e.g. &amp;lt;code&amp;gt;seconds&amp;lt;/code&amp;gt;). The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
:The &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt; plot only allows the following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the x axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk - an automatic scale is generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ymin ymax&amp;lt;/code&amp;gt; - Two numerical values - the minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the y axis unit (e.g. &amp;lt;code&amp;gt;dB&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the y axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fstyles&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; argument (see &amp;lt;code&amp;gt;fstyle&amp;lt;/code&amp;gt; for details) or a zero-based function line index as specified in a color scheme (see Color Schemes in the User Guide).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xlabtab, ylabtab, zlabtab&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Extended tables containing the scale, grid and label definitions. For a description of the table format, please see the scale definition table for details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Plot a simple x/y function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#xplot := XPLOT 1 ; 1 ; XPLOT ; Default ; 0 0 400 400&lt;br /&gt;
$#xplot plot 0 ; XYPLOT; $(eval fill(10, 0, 1)) ; * ; xyplot ; * ; ; x-axis ; * ; ; y-axis&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
======FUNCTION======&lt;br /&gt;
&lt;br /&gt;
Plot a function graph. Note that this is identical to an &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; FUNCTION ; &amp;lt;var&amp;gt;y ; x ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for parameter descriptions.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======parameter======&lt;br /&gt;
&lt;br /&gt;
Plot a parameter graph. A parameter graph differs from a function graph because a parameter plot can have missing values - it does not necessarily have values for every point on the x axis.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; parameter ; &amp;lt;var&amp;gt;y ; title ; xr ; xu ; xt ; yr ; yu ; yt ; fstyles&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
See the &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for parameter details.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
======spectrogram======&lt;br /&gt;
&lt;br /&gt;
Plot a spectrogram graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; plot &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; spectrogram ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A data array containing one spectrum or function line per &amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt; row. Note that this parameter is specific to the &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WATERFALL&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;y&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y-scale data (frequency). This can be one of the following:&lt;br /&gt;
&lt;br /&gt;
:1) &amp;lt;code&amp;gt;vData&amp;lt;/code&amp;gt; - A data vector with &amp;lt;code&amp;gt;y[!ncol]&amp;lt;/code&amp;gt; values and 1 column.&lt;br /&gt;
&lt;br /&gt;
:2) * - An asterisk: &amp;lt;code&amp;gt;y[i] = i&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;. This is the default.&lt;br /&gt;
&lt;br /&gt;
:3) &amp;lt;code&amp;gt;y1 y2&amp;lt;/code&amp;gt; - Two blank separated values: &amp;lt;code&amp;gt;y[i] = y1+i*(y2-y1)/(d[!ncol]-1)&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;i = 0..d[!ncol]-1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z scale is a color scale. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zdown&amp;lt;/code&amp;gt; - A numerical value. The maximum z value is chosen automatically and the minimum value is calculated as follows: &amp;lt;code&amp;gt;zmax-zdown&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;xyplot&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WATERFALL======&lt;br /&gt;
&lt;br /&gt;
Plot a waterfall graph.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WATERFALL ; &amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;x&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xlabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ylabtab&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;zlabtab&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;d&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The data array (one spectrum or function-line / row).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The z axis display range. The following values are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt; - An asterisk. The range is automatically generated.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;zmin zmax&amp;lt;/code&amp;gt; - Two numerical values specifying the minimum and maximum z axis values.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text describing the z axis unit (e.g. &amp;lt;code&amp;gt;s&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;zt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The title to be used for the z axis. The default is an empty string.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the x scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yw&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The relative width of the y scale. A value between &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;0.8&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of lines to be plotted. The default is &amp;lt;code&amp;gt;150&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
======WAVEFORM======&lt;br /&gt;
&lt;br /&gt;
Plot a waveform graph. Note that the displayed wave item is automatically attached to the graph. This means, no explicit call to &amp;lt;code&amp;gt;SetWave&amp;lt;/code&amp;gt; is necessary.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; WAVEFORM ; &amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;xt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;yt&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;wave&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;XWAVE&amp;lt;/code&amp;gt; instance&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xu&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The unit to use on the x axis. The following values: &amp;lt;code&amp;gt;SAMPLES&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;MS&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;. The default is &amp;lt;code&amp;gt;S&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum waveform amplitude. This can be a value between 0 and ...&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;yr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The y axis display range. This can be any positive number. The default is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fill&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; if the waveform envelope should be filled or &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======TEXTBOX======&lt;br /&gt;
&lt;br /&gt;
Plot a graph containing text.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; PLOT &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; TEXTBOX ; &amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;title&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The graph title.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;color&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text color. This can be an of the {{STX}} color arguments.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;halign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The horizontal text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;LEFT&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;RIGHT&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;valign&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The vertical text alignment. This can be one of the following values: &amp;lt;code&amp;gt;CENTER&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TOP&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;BOTTOM&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;text&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The text to be displayed. This can be a simple table with an entry per line of text or a semi-colon separated list of text lines.&lt;br /&gt;
&lt;br /&gt;
For all other parameters, see &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt; for descriptions.&lt;br /&gt;
&lt;br /&gt;
======fstyle======&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;var&amp;gt;fstyle&amp;lt;/var&amp;gt; argument passed to the &amp;lt;code&amp;gt;XPlot&amp;lt;/code&amp;gt; functions &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; has the following syntax and components:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;:&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Determines whether the function line is solid (&amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt;), dotted (&amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt;) or dashed (&amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt;). The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line on screen. This can be any {{STX}} colour keyword or RGB value. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;printcol&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The colour to use for the function line when printing. See &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; for details. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;linewidth&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The width of the function line. Possible values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; through to &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;SOLID&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt; and &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; for lines with the &amp;lt;code&amp;gt;DOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;DASH&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;linestyle&amp;lt;/var&amp;gt;. The default value is taken from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; color profile.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The style to use to draw the function. Each function point can be plotted separately (&amp;lt;code&amp;gt;POINTS&amp;lt;/code&amp;gt;), a line can be drawn between each function point (&amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;), the area below the function can be filled with the &amp;lt;var&amp;gt;linecol&amp;lt;/var&amp;gt; (&amp;lt;code&amp;gt;AREA&amp;lt;/code&amp;gt;), the function points can be joined by steps (&amp;lt;code&amp;gt;STEPS&amp;lt;/code&amp;gt; - note that this is only available for the &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plot) or no points are plotted (&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt; - this is best used when a drawing symbol (&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;) is defined). The default style is &amp;lt;code&amp;gt;LINES&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;drawsym&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The symbol to draw at each point. This can be used in conjunction with a drawing style (see &amp;lt;var&amp;gt;drawstyle&amp;lt;/var&amp;gt;). The following keywords are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;SQUARE&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;TRIANGLE|CIRCLE|CROSS|DIAMOND&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The default style is &amp;lt;code&amp;gt;NONE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value to use for missing y values. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not specified (empty) all values are displayed, otherwise all points where &amp;lt;code&amp;gt;y=&amp;lt;/code&amp;gt;&amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; are not displayed. If &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is not empty and is not a number then &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. If no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is defined, no &amp;lt;var&amp;gt;ymiss&amp;lt;/var&amp;gt; is used (this is the default).&lt;br /&gt;
&lt;br /&gt;
===Redraw===&lt;br /&gt;
&lt;br /&gt;
Redraw the selected graph. This is currently only implemented for the &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;) and &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt; plots.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; REDRAW &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function &amp;lt;code&amp;gt;Graph&amp;lt;/code&amp;gt; for details).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return 0 if successful.&lt;br /&gt;
&lt;br /&gt;
===ScaleOctave===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleOctave &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Create a scale definition table for a logarithmic frequency axis with 2000 points at 10 Hz intervals and a maximum frequency of 10000 Hz.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$(xplot scaleOctave 10 2000; 10000)&#039; #xmin #xmax #xlab #x&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also ScaleSteps.&lt;br /&gt;
&lt;br /&gt;
===ScaleLog10===&lt;br /&gt;
&lt;br /&gt;
Generate a logarithmic scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleLog10 &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;df&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The frequency resolution in Hz.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The number of frequency points.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmax&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The maximum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fmin&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The minimum frequency to be displayed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xmin xmax xlabTab xdata&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;xmin&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;xmax&amp;lt;/code&amp;gt; are is the minimum and maximum of the logarithmic scale, &amp;lt;code&amp;gt;xlabTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function and &amp;lt;code&amp;gt;xdata&amp;lt;/code&amp;gt; is the logarithmic frequency values vector. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleSteps&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===ScaleSteps===&lt;br /&gt;
&lt;br /&gt;
Generate a linear scale table for use with the &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;AddPlot&amp;lt;/code&amp;gt; functions. This function can also be called statically, e.g. &#039;&amp;lt;code&amp;gt;xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;min&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;max&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;inst&amp;lt;/var&amp;gt; ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;xplot ScaleSteps &amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;; &amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt; ; &amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;min, max&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vector&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The scale range as a data vector.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;labelDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The label distance in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the major grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;majorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between major ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorGridDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance of the minor grid lines in scale units.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;minorTickDist&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The distance between minor ticks in scale units.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
The following string is returned:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;min max labTab&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where &amp;lt;code&amp;gt;min&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;max&amp;lt;/code&amp;gt; are is the computed or corrected scale range and &amp;lt;code&amp;gt;labTab&amp;lt;/code&amp;gt; is the scale definition table which you can then pass to a &amp;lt;code&amp;gt;Plot&amp;lt;/code&amp;gt; function. See the scale definition table description in the Command Reference for details of the table syntax.&lt;br /&gt;
&lt;br /&gt;
=====Examples:=====&lt;br /&gt;
&lt;br /&gt;
Calculate the linear scale, grid and labels for an amplitude axis between -70 and -10 dB with labels every 10 dB, major grid lines and ticks every 5dB and minor grid lines and ticks every dB.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
readstr &#039;$($#xplot ScaleSteps -70 -10 ; 10 ; 5 ; 5 ; 1 ; 1)&#039; #ymin #ymax #ylab&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Notes:=====&lt;br /&gt;
&lt;br /&gt;
See also &amp;lt;code&amp;gt;ScaleOctave&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;ScaleLog10&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Set===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; function sets the cursor mode and text attributes.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; Set [ &amp;lt;var&amp;gt;graph&amp;lt;/var&amp;gt;|* ; ] &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;xgraph&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:An xgraph instance on which to call the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command. If no graph is specified or an asterisk, then the &amp;lt;code&amp;gt;Set&amp;lt;/code&amp;gt; command is carried out on all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:One of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt; - turn cursors on and off and change the way they look.&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xunit&amp;lt;/code&amp;gt; - the name of the x-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;yunit&amp;lt;/code&amp;gt; - the name of the y-axis unit&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;xtext&amp;lt;/code&amp;gt; - the description of the x-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;ytext&amp;lt;/code&amp;gt; - the description of the y-axis&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;title&amp;lt;/code&amp;gt; - the graph&#039;s title&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value of &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; depends on &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is as follows:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;mode|* type|* line|*&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Where mode is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt; - show the cursor&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; - hide the cursor&lt;br /&gt;
&lt;br /&gt;
:Where &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;cross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;crosshair&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;vbarcross&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;harmonic&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:And &amp;lt;code&amp;gt;line&amp;lt;/code&amp;gt; is one of the following values:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;off&amp;lt;/code&amp;gt; |&amp;lt;code&amp;gt;on&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If &amp;lt;var&amp;gt;attr&amp;lt;/var&amp;gt; is not &amp;lt;code&amp;gt;cursormode&amp;lt;/code&amp;gt;, then &amp;lt;var&amp;gt;args&amp;lt;/var&amp;gt; is used as the text, unit or title.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetCallback===&lt;br /&gt;
&lt;br /&gt;
The callback function is called by the message handlers to process popup and context menu messages and hotkeys which are not used by &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt;. The following commands are used to call the callback function:&lt;br /&gt;
&lt;br /&gt;
If called from an &amp;lt;code&amp;gt;XGRAPH&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xgraphinstance irow icol msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If called from the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; message handler:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;cbfunction xplotinstance * * msgid msgpar&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetCallback [ &amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cbfunction&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The name of the callback function or an empty string to remove a previous association.&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
No return value.&lt;br /&gt;
&lt;br /&gt;
===SetWave===&lt;br /&gt;
&lt;br /&gt;
Attach a signal to one graph or all graphs (see &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;). If a wave item is attached to a graph, it can not be deleted before it is detached or the graph or &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; instance is deleted.&lt;br /&gt;
&lt;br /&gt;
=====Usage:=====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;var&amp;gt;xplot&amp;lt;/var&amp;gt; SetWave &amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt; ; [ &amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt; ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Parameters:=====&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;adr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The address of the display splitter (see member function Graph for details). If this parameter is omitted, then the wave item is set for all graphs.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;waveitem&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A wave item id or an &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XWave : CObjEx|XWAVE]]&amp;lt;/code&amp;gt; instance (or empty to remove attachment).&lt;br /&gt;
&lt;br /&gt;
=====Result:=====&lt;br /&gt;
&lt;br /&gt;
Return &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; if successful.&lt;br /&gt;
&lt;br /&gt;
Note that wave items can only be attached to graphs of type &amp;lt;code&amp;gt;FUNCTION&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;XYPLOT&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;PARAMETER&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;SPECTROGRAM&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;WAVEFORM&amp;lt;/code&amp;gt;.====XPlot Hotkeys====&lt;br /&gt;
&lt;br /&gt;
The following hotkeys are implemented in the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|C&lt;br /&gt;
|Turn the cursors on and off.&lt;br /&gt;
|-&lt;br /&gt;
|S&lt;br /&gt;
|Change to the next cursor style.&lt;br /&gt;
|-&lt;br /&gt;
|B&lt;br /&gt;
|Turn cursor binding on and off.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+N&lt;br /&gt;
|Bind the cursor to the next function.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+P&lt;br /&gt;
|Bind the cursor to the previous function.&lt;br /&gt;
|-&lt;br /&gt;
|R&lt;br /&gt;
|Turn the cursor rubberline on and off.&lt;br /&gt;
|-&lt;br /&gt;
|T&lt;br /&gt;
|Turn the title on and off.&lt;br /&gt;
|-&lt;br /&gt;
|X&lt;br /&gt;
|Change to the next x&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Y&lt;br /&gt;
|Change to the next y&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Z&lt;br /&gt;
|Change to the next z&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;scale mode.&lt;br /&gt;
|-&lt;br /&gt;
|Space&lt;br /&gt;
|Open the setup dialog.&lt;br /&gt;
|-&lt;br /&gt;
|P&lt;br /&gt;
|Play the attached wave (between the cursors).&lt;br /&gt;
|-&lt;br /&gt;
|Q&lt;br /&gt;
|Play the attached wave (the whole signal).&lt;br /&gt;
|-&lt;br /&gt;
|ESC&lt;br /&gt;
|Stop playback.&lt;br /&gt;
|-&lt;br /&gt;
|Ins&lt;br /&gt;
|Show the selected metasegment&#039;s settings in a dialog or, if no metasegment is selected, show a dialog to create a new metasegment.&lt;br /&gt;
|-&lt;br /&gt;
|Del&lt;br /&gt;
|Delete the selected metasegments.&lt;br /&gt;
|-&lt;br /&gt;
|Ctrl+Left Click&lt;br /&gt;
|Move the legend to the clicked position.&lt;br /&gt;
|-&lt;br /&gt;
|Shift+Left Click&lt;br /&gt;
|Create a metasegment at the clicked position (show the &#039;Insert Metasegment&#039; dialog).&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====XPlot Examples====&lt;br /&gt;
&lt;br /&gt;
=====Simple XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates simple &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; usage.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro xplot_example_1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display (and graph)&lt;br /&gt;
    //&lt;br /&gt;
    #xplot := xplot 2 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
    if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
    //&lt;br /&gt;
    // plot graphs (including data generation)&lt;br /&gt;
    //&lt;br /&gt;
    #nValues := 100&lt;br /&gt;
    $#xplot Plot 0 0 ; XYPLOT ; $(eval fill($#nValues,1,1)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    $#xplot Plot 1 0 ; SPECTROGRAM ; $(eval rand(1,100,100)) ; * ; Graph Title ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    // the clean up takes place automatically&lt;br /&gt;
    // when the plot window is closed&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=====Plot rows of a matrix using XPLOT=====&lt;br /&gt;
&lt;br /&gt;
The following example demonstrates how to plot the rows of a matrix using the &amp;lt;code&amp;gt;[[Programmer Guide/Class Library/XPlot : CObjEx|XPLOT]]&amp;lt;/code&amp;gt; class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//{{3.9 6473}{2009.01.29  16.44.04} - automatically created version information - do not change or delete this line}&lt;br /&gt;
&lt;br /&gt;
[macro xplot_example_2]&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      This row demonstrates how to plot each row of a matrix&lt;br /&gt;
//&lt;br /&gt;
//      C.G. 29.1.2009&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create display (and graph)&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#xplot := xplot 1 ; 1 ; xplot ; default ; 100 100 800 800&lt;br /&gt;
if &#039;$#xplot[?]&#039; != &#039;instance&#039; em -1 ; xplot creation failed ($emsg)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// create a matrix and fill it with some meaningless data&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
#mat := new table * /Parameter * number:X:100&lt;br /&gt;
if &#039;$#mat[?]&#039; != table em -1 ; cannot create table ($emsg)&lt;br /&gt;
&lt;br /&gt;
for #i := 0 to $#i &amp;lt; 10 step #i := int $#i + 1&lt;br /&gt;
        $#mat[$#i,*] := eval fill( 100, $#i+1, $#i+1 )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
// plot each row of the matrix&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
for #i := int 0 to $#i &amp;lt; $#mat[!nrow] step #i := int $#i + 1&lt;br /&gt;
        #x := eval $#mat[$#i,*]&lt;br /&gt;
        $#xplot AddPlot 0 0 ; XYPLOT ; $#x ; * ; row-by-row plot ; * ; x unit ; x title ; * ; y unit ; y title ; solid:green::1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====Advanced XPLOT Example=====&lt;br /&gt;
&lt;br /&gt;
This example not only demonstrates the use of the &amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt; class, but also signal processing using the &amp;lt;code&amp;gt;EVAL&amp;lt;/code&amp;gt; function.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
//      &lt;br /&gt;
//      DSP Examples&lt;br /&gt;
//      &lt;br /&gt;
//      last update:    Nov 17, 2007 (AN)&lt;br /&gt;
//      {{STX}} version:    {{STX}} 3.8 Beta&lt;br /&gt;
//&lt;br /&gt;
//      The examples in this file demonstrates how to ...&lt;br /&gt;
//              ...     use the EVAL command for signal processing&lt;br /&gt;
//              ...     use the class XWAVE     to read a signal frame by frame&lt;br /&gt;
//              ...     display spectrograms, waveforms and functions in XPLOT graphs&lt;br /&gt;
//              ...     enable XPLOT to play signals&lt;br /&gt;
//              ...     use the XPLOT callback function to implement simple user controls&lt;br /&gt;
//              ...     set and get cursor attritbutes and positions of XPLOT graphs&lt;br /&gt;
//              ...     add a legend to a XPLOT graph&lt;br /&gt;
//              ... use BUTIL MSGBOX for simple dialogs&lt;br /&gt;
//              ...     use the CON object (class BScript) to display log. messages&lt;br /&gt;
//              ...     use the CON object to save numeric tables to textfiles&lt;br /&gt;
//              ...     simulate item messages using the message queue macro MSGQUEUE&lt;br /&gt;
//              ...     implement and call local subroutines&lt;br /&gt;
//&lt;br /&gt;
//=================================================================================================&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExAvrSpectrum                Create a plot containing the average spectra of all segments selected&lt;br /&gt;
//                                                      in the DataSet view.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExAvrSpectrum #lfrm=100ms&#039;;&#039;#sfrm=50%&#039;;&#039;#wtyp=hamming&#039;;&#039;#ascale=dB&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming, ...)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      create the result table (one spectrum per row)&lt;br /&gt;
#asp := new table * * num:x:$#segments[] /p&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
#nok := 0       //      number of computed average spectra&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
        con log process segment &amp;quot;set=$#aset, id=$#aseg, ch=$#ach&amp;quot; ($(int $#i+1) of $#segments[])&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        //      usage: XWAVE setref ; segmentid ; channel ; mode ; framelength ; frameshift ; ampmax ; ampref&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        //      set / check sampling rate&lt;br /&gt;
        else if &#039;$#srate&#039; == &#039;&#039; then&lt;br /&gt;
                #srate := $($#wave srate)       &lt;br /&gt;
        else if $($#wave srate) != $#srate then&lt;br /&gt;
                butil &#039;msgbox msg; segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; - sampling rate mismatch; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
        &lt;br /&gt;
        //      compute the average spectrum&lt;br /&gt;
        if $(#tmp := dspexlib averagespectrum $#wave ; $#wtyp ; $#ascale)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute average spectrum of segment &amp;quot;$#aset/$#aseg,$#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy  //      delete wave object&lt;br /&gt;
                continue&lt;br /&gt;
        end&lt;br /&gt;
                &lt;br /&gt;
        $#asp[*,$#nok] := $#tmp                                 //      save the spectrum&lt;br /&gt;
        delete $#tmp                                                    //      delete temp. buffer&lt;br /&gt;
        #legend := &#039;$#legend $($#wave title);&#039;  //      add segment to legend string&lt;br /&gt;
        $#wave destroy                                                  //      delete wave object&lt;br /&gt;
        #nok := int $#nok+1                                             //      increment result vector counter&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      exit if no results are computed&lt;br /&gt;
if $#nok &amp;lt; 1 exit &lt;br /&gt;
&lt;br /&gt;
//      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
readstr &#039;$(dspexlib frequencyscale $#srate ; $#asp[!nrow] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
//      create and configure the plot object&lt;br /&gt;
//      usage: XPLOT rows ; cols0 cols1 .. ; windowtitle ; graphicprofile ; wx wy wwidth wheight&lt;br /&gt;
#plot := xplot 1; 1; Average Spectrum; Rainbow; 0 0 1024 800&lt;br /&gt;
&lt;br /&gt;
//      plot all spectra and display the legend&lt;br /&gt;
#title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; $#df&lt;br /&gt;
readstr &#039;$(dspexlib amplitudescale $#ascale)&#039; #ytext #yunit&lt;br /&gt;
//      usage: xplot PLOT row col; FUNCTION; ydata; xdata; title; xrange; xunit; xtext; yrange; yunit; yrange&lt;br /&gt;
$#plot plot 0; function; $#asp; $#frq; $#title; ; $#funit; frequency; ; $#yunit ; $#ytext&lt;br /&gt;
$#plot legend 0; %; 50; 95; 45; 5; black; color; $#legend&lt;br /&gt;
$#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
$#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
//      wait until plot window is closed &lt;br /&gt;
$#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
//      finished - cleanup and and exit&lt;br /&gt;
delete $#asp $#frq $#segments   //      delete data items&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExSpectrogram                Plot a spectrogram of all segments selected in the DataSet view.&lt;br /&gt;
//                                                      For each segment one spectrogram window is displayed. The window&lt;br /&gt;
//                                                      must be closed before the next segment is analysed.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExSpectrogram #lfrm=40ms&#039;;&#039;#sfrm=10%&#039;;&#039;#wtyp=hamming&#039;;&#039;#arange=50&#039;;&#039;#fscale=Hz&#039;;&#039;#amax=1&#039;;&#039;#aref=1&#039;;&#039;#]&lt;br /&gt;
//      arguments:      #lfrm           frame length,   absolute time expression&lt;br /&gt;
//                              #sfrm           frame shift,    relative time expression&lt;br /&gt;
//                              #wtyp           window type,    {Hanning, Hamming)&lt;br /&gt;
//                              #arange         spectrogram display range in dB (max .. max-range)&lt;br /&gt;
//                              #fscale         spectrogram frequency scale unit (Hz, kHz, Bark, Mel, ERB)&lt;br /&gt;
//                              #amax           calibration factor or CALSET to use a calibration set&lt;br /&gt;
//                              #aref           reference amplitude, ignored if #amax equals CALSET&lt;br /&gt;
&lt;br /&gt;
//      set mode variable to macro name (see macro DSPExCallback)&lt;br /&gt;
DSPExMode := set &#039;$#mac&#039;&lt;br /&gt;
&lt;br /&gt;
//      get segments selected in the DataSet view&lt;br /&gt;
#segments := dspexlib getsegments&lt;br /&gt;
&lt;br /&gt;
//      segment analysis loop&lt;br /&gt;
for #i := 0 to $#i &amp;lt; $#segments[] &amp;amp;&amp;amp; &#039;$DSPExMode&#039; != &#039;&#039; step #i := int $#i+1&lt;br /&gt;
&lt;br /&gt;
        //      get next segment from segment list&lt;br /&gt;
        readtab $#segments $#i #aset&#039;;&#039;#aseg&#039;;&#039;#ach&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      create the wave object and initialize frame settings (mode &amp;quot;centered&amp;quot;)&lt;br /&gt;
        if $(#wave := xwave &#039;$#aset;$#aseg;$#ach;1;$#lfrm;$#sfrm;$#amax;$#aref&#039;)[?] != instance then&lt;br /&gt;
                butil &#039;msgbox msg; create wave object for segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute the spectrogram&lt;br /&gt;
        if $(#asp := dspexlib spectrogram $#wave ; $#wtyp ; log)[?] != table then&lt;br /&gt;
                butil &#039;msgbox msg; compute spectrogram of segment &amp;quot;$#aset ; $#aseg ; $#ach&amp;quot; failed; Error!&#039;&lt;br /&gt;
                $#wave destroy&lt;br /&gt;
                continue&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        //      compute frequency scale vector, unit and frequency resolution&lt;br /&gt;
        readstr &#039;$(dspexlib frequencyscale $($#wave srate) ; $#asp[!ncol] ; $#fscale)&#039; #frq #funit #df&lt;br /&gt;
&lt;br /&gt;
        //      create and configure the plot object&lt;br /&gt;
        #plot := xplot 2; 1 1; $($#wave title)   quit = c-q, next = c-n; Rainbow; 0 0 1024 800&lt;br /&gt;
        $($#plot display) height 3 1 /apply             //      set height of graphs&lt;br /&gt;
&lt;br /&gt;
        //      plot spectrogram and waveform&lt;br /&gt;
        #title := format &#039;lfrm=%s, sfrm=%s, wtyp=%s, arange=%s, amax=%.1fdB, df=%.3fHz&#039; &#039;$#lfrm&#039; &#039;$#sfrm&#039; &#039;$#wtyp&#039; &#039;$#arange&#039; $(eval max($#asp)) $#df&lt;br /&gt;
        $#plot plot 0; spectrogram; $#asp; $#frq; $#title; $($#wave tbegin) $($#wave tend); s; time; ; $#funit; frequency; $#arange&lt;br /&gt;
        $#plot plot 1; waveform; $#wave; ; s; time; $($#wave amax); $($#wave amax); amplitude; 1&lt;br /&gt;
        $#plot set cursormode on crosshair      //      set cursor mode and style       &lt;br /&gt;
        $#plot setcallback dspexcallback        //      assign callback function&lt;br /&gt;
&lt;br /&gt;
        //      assign wave object to xplot graphs (for playback)&lt;br /&gt;
        $#plot setwave $#wave &lt;br /&gt;
&lt;br /&gt;
        //      wait until plot window is closed &lt;br /&gt;
        $#plot end      //      the xplot object is destroyed automatically when the window is closed&lt;br /&gt;
  &lt;br /&gt;
        //      cleanup&lt;br /&gt;
        delete $#asp $#frq              //      delete data items&lt;br /&gt;
        $#wave destroy                  //      delete wave object&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      finished - cleanup and exit&lt;br /&gt;
delete $#segments       //      delete segment table&lt;br /&gt;
showLogOnExit := 0      //      close the bscript log-window automatically &lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExCallback                   Callback function for XPLOT.&lt;br /&gt;
//&lt;br /&gt;
//      arguments:&lt;br /&gt;
//              if called from xplotobject message handler      -&amp;gt;   &#039;CALLBACK xplotobject * * msgid msgpar&#039;                   &lt;br /&gt;
//              if called from xgraphobject message handler     -&amp;gt;   &#039;CALLBACK xgraphobject row col msgid msgpar&#039;&lt;br /&gt;
//&lt;br /&gt;
//      Note: This macro uses the shell variable DSPEXMODE to check which macro has installed the &lt;br /&gt;
//      callback and to set return values.&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExCallback #obj #row #col #msgid #msgpar]&lt;br /&gt;
&lt;br /&gt;
//      get xplot-object if called from a xgraph-object&lt;br /&gt;
if &#039;$#obj[!class]&#039; == xgraph #obj := $#obj get xplot&lt;br /&gt;
&lt;br /&gt;
//      message filter for keystroke messages&lt;br /&gt;
&lt;br /&gt;
//      process Control-Q (QUIT) key&lt;br /&gt;
if &#039;$#msgid$#msgpar&#039; == keyCQ then&lt;br /&gt;
&lt;br /&gt;
        if $(butil msgbox yesno; Quit ?; $DSPExMode) == yes then&lt;br /&gt;
                //      place the display-close message in the message queue to end the xplot message loop&lt;br /&gt;
                msgqueue &#039;display $($#obj display) close&#039;&lt;br /&gt;
                //      set mode variable to empty-string if C-Q key was pressed&lt;br /&gt;
                DSPExMode := &#039;&#039;&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-C (COPY) and Control-S (SAVE) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCC keyCS) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0 (later used to retrieve data)&lt;br /&gt;
        #obj := $#obj graph 0; instance&lt;br /&gt;
&lt;br /&gt;
        //      select the data to be saved and the save format&lt;br /&gt;
        #todo := butil msgbox userdefined Amp Frq+Amp Cancel;; $DSPExMode - $(word $#i &#039;Copy to Clipboard&#039; &#039;Save to CSV-File&#039;) &lt;br /&gt;
        if $#todo == Amp then&lt;br /&gt;
                #table := eval $($#obj get ydata)       //      use eval to get a copy of y-data&lt;br /&gt;
        else if $#todo == Frq+Amp then&lt;br /&gt;
                if &#039;$DSPExMode&#039; == DSPExAvrSpectrum then&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , $($#obj get ydata) ) // merge x- and y-data into one table&lt;br /&gt;
                else&lt;br /&gt;
                        #table := eval vmcol( $($#obj get xdata) , trn($($#obj get ydata)) ) // merge x- and transposed y-data into one table&lt;br /&gt;
                end&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      copy / save if table exists&lt;br /&gt;
        if $#table[?] == table then&lt;br /&gt;
                //      select target&lt;br /&gt;
                if $#i == 0 then&lt;br /&gt;
                        #file := set clipboard  // set target to &amp;quot;clipboard&amp;quot; for all copy_xxx functions&lt;br /&gt;
                else&lt;br /&gt;
                        #file := butil filedialog save; Select Output File; ; CSV=CSV-File; TXT=Textfile        //      use filedialog to select the output file&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
                //      use the CON-object to copy/save table&lt;br /&gt;
                if &#039;$#file&#039; != &#039;&#039; con savedata text; $#table; $#file; 0; comma; dot&lt;br /&gt;
                delete $#table&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
//      process Control-I (INFO) || Control-M (MAX-MEAN) keys&lt;br /&gt;
else if $(#i := keyword &#039;$#msgid$#msgpar&#039; keyCI keyCM) &amp;gt;= 0  then&lt;br /&gt;
&lt;br /&gt;
        //      get xgraph-object displayed in row 0&lt;br /&gt;
        #obj := $#obj graph 0;inst&lt;br /&gt;
&lt;br /&gt;
        //      save original graph title&lt;br /&gt;
        if &#039;$GraphTitle&#039; == &#039;&#039; GraphTitle := $#obj get title&lt;br /&gt;
&lt;br /&gt;
        if $#i == 0 then&lt;br /&gt;
                //      get and display cursor positions&lt;br /&gt;
                readstr &#039;$($#obj get cursorposition)&#039; #i1 #x1 #y1 #i2 #x2 #y2 #&lt;br /&gt;
                #text := format &#039;Index = %d .. %d,  X = %g ... %g (%g),  Y = %g ... %g (%g)&#039; $#i1 $#i2 $#x1 $#x2 abs($#x1-$#x2) $#y1 $#y2 abs($#y1-$#y2)&lt;br /&gt;
        else&lt;br /&gt;
                //      set cursor mode (on), style (crosshair), rubberline (off), bind-mode (off), bind-functionindex (0)&lt;br /&gt;
                $#obj set cursormode on crosshair off off 0&lt;br /&gt;
                //      get x- and y-data&lt;br /&gt;
                #x := $#obj get xdata&lt;br /&gt;
                #y := $#obj get ydata&lt;br /&gt;
                //      find index of maximum y value &lt;br /&gt;
                #imax := eval imax($#y[*,0])&lt;br /&gt;
                //      compute mean of x and y&lt;br /&gt;
                #xavr := eval avr($#x)&lt;br /&gt;
                #yavr := eval avr($#y)&lt;br /&gt;
                //      set cursor 1 to maximum and cursor 2 to mean&lt;br /&gt;
                $#obj set cursorpos 1 $#x[$#imax] $#y[$#imax] deselect&lt;br /&gt;
                $#obj set cursorpos 2 $#xavr $#yavr deselect&lt;br /&gt;
                //      show maximum and mean in xgraph title&lt;br /&gt;
                #text := format &#039;Maximum( %g , %g ), Average( %g , %g )&#039; $#x[$#imax] $#y[$#imax] $#xavr $#yavr&lt;br /&gt;
        end&lt;br /&gt;
        //      show info in graph title&lt;br /&gt;
        $#obj set title $GraphTitle -- $#text&lt;br /&gt;
&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
//      note: the return value of the callback function is not used by the xplot/xgraph message handler&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
//&lt;br /&gt;
//      DSPExLib                        Implements a set of signal processing functions which can be called with&lt;br /&gt;
//                                              &amp;quot;DSPLIBEXAMPLE functionname functionarguments&amp;quot;. This call style is often&lt;br /&gt;
//                                              used to reduce the number of macros of a script or application.&lt;br /&gt;
//&lt;br /&gt;
//      Functions:&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB GETSEGMENTS&lt;br /&gt;
//                      result: a list of all segments selected in the DataSet view stored in a simple&lt;br /&gt;
//                                      table (per line: &#039;setReference ; segmentId ; channelIndex&#039;)&lt;br /&gt;
//                      note:   this function shows an error message and terminates the caller if no segments&lt;br /&gt;
//                                      are selected&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AVERAGESPECTRUM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: an averaged fft spectrum in the selected format&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB SPECTROGRAM wave ; wtyp ; atyp&lt;br /&gt;
//                      wave            prepared xwave object&lt;br /&gt;
//                      wtyp            type of window function:        HANNING, HAMMING, KAISER, ...&lt;br /&gt;
//                      atyp            type of output spectrum:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                                                                                                      or COMPLEX&lt;br /&gt;
//                      result: a matrix of fft spectra in the selected format, one spectrum per line&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB FREQUENCYSCALE sr ; n ; type&lt;br /&gt;
//                      sr                      sampling rate in Hz&lt;br /&gt;
//                      n                       number of spectrum bins (equally spaced in the Hz domain)&lt;br /&gt;
//                      type            type of frequency scale:        HZ, KHZ, BARK, MEL, ERB&lt;br /&gt;
//                      result: &#039;frq unit df&#039;; frq is the frequency scale vector, unit is the frequency unit&lt;br /&gt;
//                                      name and df is the frequency scale step in Hz&lt;br /&gt;
//&lt;br /&gt;
//              DSPEXLIB AMPLITUDESCALE type&lt;br /&gt;
//                      type            type of amplitude scale:        LOGARITHMIC (=DB), POWER, LINEAR (=AMPLITUDE)&lt;br /&gt;
//                      result: &#039;name unit df&#039;; name and unit of amplitude scale&lt;br /&gt;
//&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
[Macro DSPExLib]&lt;br /&gt;
&lt;br /&gt;
//      function call dispatching&lt;br /&gt;
readvar #argv #fun #argv /d&lt;br /&gt;
goto fun$#fun noFun&lt;br /&gt;
&lt;br /&gt;
noFun:&lt;br /&gt;
//      function not implemented&lt;br /&gt;
//      result: empty string&lt;br /&gt;
&lt;br /&gt;
        //      show an error message and exit&lt;br /&gt;
        con log &#039;$#mac function &amp;quot;$#fun&amp;quot; not implemented&#039; &lt;br /&gt;
        exit 1 set &#039;&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funGetSegments: //      in:&lt;br /&gt;
                                //      out:    segment_list_table&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      retrieve list of selected segments from the DataSet application&lt;br /&gt;
        #segments := datasetcmd getselected segments&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table &amp;amp;&amp;amp; &#039;$#segments[]&#039; &amp;gt; 0 exit 1 set $#segments&lt;br /&gt;
        butil msgbox msg ; no segments selected - select and try again; Error!&lt;br /&gt;
        if &#039;$#segments[?]&#039; == table delete $#segments&lt;br /&gt;
        exit 2 set &#039;&#039;   //      terminate this and the calling macro!&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAverageSpectrum:     //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                        //      out:    averagespectrum_vector&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      create result table &lt;br /&gt;
        #spg := new table * &lt;br /&gt;
&lt;br /&gt;
        //      compute averaged amplitude spectrum&lt;br /&gt;
        #n := $($#wave framecount)&lt;br /&gt;
        $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
        for #i := 1 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                $#spg := eval cr2len ( fft ( $($#wave read) ?* $#w ) ) + $#spg&lt;br /&gt;
        end&lt;br /&gt;
        $#spg := eval $#spg / $#n&lt;br /&gt;
&lt;br /&gt;
        //      convert to selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
        else if $#atyp == 2 then &lt;br /&gt;
                $#spg := eval $#spg ?^ 2&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return averaged spectrum&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funSpectrogram: //      in:             xwaveobject ; windowtype ; amplitudescale &lt;br /&gt;
                                //      out:    spectrogram_matrix&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #wave&#039;;&#039;#wtyp&#039;;&#039;#atyp&#039;;&#039;#&lt;br /&gt;
&lt;br /&gt;
        //      show init message&lt;br /&gt;
        con log $#mac $(upper &#039;$#fun&#039;) - initializing&lt;br /&gt;
&lt;br /&gt;
        //      create window&lt;br /&gt;
        #w := gosub makewindow $($#wave framelength) $#wtyp&lt;br /&gt;
&lt;br /&gt;
        //      check selected output spectrum type&lt;br /&gt;
        if $(#atyp := keyword &#039;$#wtyp&#039; dB logarithmic power amplitude linear complex) &amp;lt; 5 then&lt;br /&gt;
                //      compute amplitude or power spectra&lt;br /&gt;
        &lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength)/2 + 1) /p&lt;br /&gt;
                //      compute amplitude spectra&lt;br /&gt;
                #n := $($#wave framecount)&lt;br /&gt;
                for #i := 0 to $#i &amp;lt; $#n step #i := int $#i+1&lt;br /&gt;
                        if $#i%10 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval cr2len ( fft ( $($#wave read) ?* $#w ) )&lt;br /&gt;
                end&lt;br /&gt;
                //      convert to selected output spectrum type&lt;br /&gt;
                if $(#atyp := keyword &#039;$#atyp&#039; dB logarithmic power amplitude linear) &amp;lt; 2 then&lt;br /&gt;
                        $#spg := eval lin2log($#spg , $($#wave aref), 20)&lt;br /&gt;
                else if $#atyp == 2 then &lt;br /&gt;
                        $#spg := eval $#spg ?^ 2&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        else&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
&lt;br /&gt;
                //      create result table (one spectrum per line)&lt;br /&gt;
                #spg := new table * * num:x:$(int $($#wave fftlength) + 2) /p&lt;br /&gt;
                //      compute complex spectra&lt;br /&gt;
                for #i := int $($#wave framecount) to $#i &amp;gt; 0 step #i := int $#i-1&lt;br /&gt;
                        if $#i%50 == 0 con logext 0; $#mac $(upper &#039;$#fun&#039;) - $#i of $#n frames processed&lt;br /&gt;
                        $#spg[$#i,*] := eval fft ( $($#wave read) ?* $#w )&lt;br /&gt;
                end&lt;br /&gt;
&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        //      show end message&lt;br /&gt;
        con logext 0; $#mac $(upper &#039;$#fun&#039;) - finished ($#n spectra computed)&lt;br /&gt;
&lt;br /&gt;
        //      return spectrogram matrix&lt;br /&gt;
        exit 1 set $#spg&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funFrequencyScale:      //      in:             samplingrate ; spectrumbins ; frequencyscale &lt;br /&gt;
                                        //      out:    frequencyscale_vector frequencyscale_unit frequency_resolution_Hz&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #sr&#039;;&#039;#n&#039;;&#039;#unit&#039;;&#039;#&lt;br /&gt;
        //      generate frequency scale equally spaced in Hz&lt;br /&gt;
        #frq := new table * // dummy table to make frq-scale permanent&lt;br /&gt;
        $#frq := eval fill($#n, 0, $(#df := eval $#sr / 2 / ($#n - 1)) )&lt;br /&gt;
        //      convert to selected scale&lt;br /&gt;
        if $(#unit := keyword &#039;$#unit&#039; Hz kHz Bark Mel ERB) &amp;lt; 0 #unit := 0&lt;br /&gt;
        if $(#unit := word $#unit Hz kHz Bark Mel ERB) == kHz then&lt;br /&gt;
                $#frq := eval $#frq / 1000&lt;br /&gt;
        else if $#unit != Hz then&lt;br /&gt;
                $#frq := eval hz2$#unit($#frq)&lt;br /&gt;
        end&lt;br /&gt;
        //      return scale settings&lt;br /&gt;
        exit 1 set &#039;$#frq $#unit $#df&#039;&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
funAmplitudeScale:      //      in:             amplitudescale &lt;br /&gt;
                                        //      out:    amplitudescale_text amplitudescale_unit&lt;br /&gt;
//-------------------------------------------------------------------------------------------------&lt;br /&gt;
        //      parse arguments&lt;br /&gt;
        readvar #argv #unit&#039;;&#039;#&lt;br /&gt;
        //      get text and unit of amplitude scale&lt;br /&gt;
        if $(#i := keyword &#039;$#unit&#039; dB logarithmic power amplitude linear) &amp;lt; 2 #i := 0&lt;br /&gt;
        #unit := word $#i dB dB - - -&lt;br /&gt;
        #text := word $#i amplitude amplitude power amplitude amplitude&lt;br /&gt;
        exit 1 set &#039;$#text $#unit&#039;&lt;br /&gt;
&lt;br /&gt;
//&lt;br /&gt;
//      local subroutines&lt;br /&gt;
//&lt;br /&gt;
&lt;br /&gt;
makeWindow:&lt;br /&gt;
        //      GOSUB MAKEWINDOW windowlength windowtype -&amp;gt; windowvector&lt;br /&gt;
        readvar #argv #wlen #wtyp # &lt;br /&gt;
        #list := hanning hamming blackman kaiser bartlett taprect nuttall flattop gauss&lt;br /&gt;
        if $(#wtyp := keyword &#039;$#wtyp&#039; $#list) &amp;lt; 0 #wtyp := 0 &lt;br /&gt;
        exit 1 eval window($#wtyp, $#wlen, 1) * 2 / $#wlen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=MediaWiki:Common.css&amp;diff=7118</id>
		<title>MediaWiki:Common.css</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=MediaWiki:Common.css&amp;diff=7118"/>
		<updated>2014-05-20T12:28:33Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;/* CSS placed here will be applied to all skins */&lt;br /&gt;
&lt;br /&gt;
/* and, again, using this for *all* our tables... */&lt;br /&gt;
&lt;br /&gt;
table {&lt;br /&gt;
   border: 0px;&lt;br /&gt;
   border-collapse: collapse;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table tr {&lt;br /&gt;
   border: 1px solid;&lt;br /&gt;
   border-color: #000000;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table th {&lt;br /&gt;
   border: 1px solid;&lt;br /&gt;
   border-color: #000000;&lt;br /&gt;
   background-color:#FFC8FF;&lt;br /&gt;
   vertical-align: top;&lt;br /&gt;
   padding-left: 0.8em;&lt;br /&gt;
   padding-right: 0.8em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table td {&lt;br /&gt;
   border: 1px solid;&lt;br /&gt;
   border-color: #000000;&lt;br /&gt;
   vertical-align: top;&lt;br /&gt;
   padding-left: 0.8em;&lt;br /&gt;
   padding-right: 0.8em;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* C.G. 6.4.2011: einrahmen - einfacher, dünner Rand allüberall (wie von Toni gewünscht) */&lt;br /&gt;
&lt;br /&gt;
table.einrahmen {&lt;br /&gt;
   border: 0px;&lt;br /&gt;
   border-collapse: collapse;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.einrahmen tr {&lt;br /&gt;
   border: 1px solid;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.einrahmen th {&lt;br /&gt;
   border: 1px solid;&lt;br /&gt;
   background-color:#FFC8FF;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.einrahmen td {&lt;br /&gt;
   border: 1px solid;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* C.G. 6.4.2011: keinrahmen - kein Rand */&lt;br /&gt;
&lt;br /&gt;
table.keinrahmen {&lt;br /&gt;
   border: 0px;&lt;br /&gt;
   border-style: hidden;&lt;br /&gt;
   border-collapse: collapse;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.keinrahmen tr {&lt;br /&gt;
   border: 0px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.keinrahmen th {&lt;br /&gt;
   border: 0px;&lt;br /&gt;
   border-style: hidden;&lt;br /&gt;
   background-color:#FFC8FF;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.keinrahmen td {&lt;br /&gt;
   border: 0px;&lt;br /&gt;
   border-style: hidden;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
/* C.G. 6.4.2011: zweirahmen - zweifacher, dünner Rand allüberall (wie von Toni gewünscht) */&lt;br /&gt;
&lt;br /&gt;
table.zweirahmen {&lt;br /&gt;
   border: 1px;&lt;br /&gt;
   border-collapse: separate;&lt;br /&gt;
   border-spacing:2px;&lt;br /&gt;
   border-style:double;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.zweirahmen tr {&lt;br /&gt;
   border: 1px;&lt;br /&gt;
   border-style:double;&lt;br /&gt;
   border-spacing:2px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.zweirahmen th {&lt;br /&gt;
   border: 1px;&lt;br /&gt;
   border-style:double;&lt;br /&gt;
   background-color:#FFC8FF;&lt;br /&gt;
   border-spacing:2px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
table.zweirahmen td {&lt;br /&gt;
   border: 1px;&lt;br /&gt;
   border-style:double;&lt;br /&gt;
   border-spacing:2px;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/* C.G. 6.4.2011: sicherstellen, dass Variablennamen äquidistant gesetzt werden */&lt;br /&gt;
&lt;br /&gt;
var { font-family: Courier, &amp;quot;Courier New&amp;quot;, monospace; background-color: #ffc0cb; }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
code { font-family: Courier, &amp;quot;Courier New&amp;quot;, monospace; background-color: #e0ffff; }&lt;br /&gt;
pre { font-family: Courier, &amp;quot;Courier New&amp;quot;, monospace; background-color: #e0ffff; }&lt;br /&gt;
&lt;br /&gt;
/* J.W. 20.5.2014: adding TOC limit functionality from default Mediawiki:Common.css */&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
 * Allow limiting of which header levels are shown in a TOC;&lt;br /&gt;
 * &amp;lt;div class=&amp;quot;toclimit-3&amp;quot;&amp;gt;, for instance, will limit to&lt;br /&gt;
 * showing ==headings== and ===headings=== but no further&lt;br /&gt;
 * (as long as there are no =headings= on the page, which&lt;br /&gt;
 * there shouldn&#039;t be according to the MoS).&lt;br /&gt;
 * [[Vorlage:TOC limit]]&lt;br /&gt;
 */&lt;br /&gt;
.toclimit-2 .toclevel-1 ul,&lt;br /&gt;
.toclimit-3 .toclevel-2 ul,&lt;br /&gt;
.toclimit-4 .toclevel-3 ul,&lt;br /&gt;
.toclimit-5 .toclevel-4 ul,&lt;br /&gt;
.toclimit-6 .toclevel-5 ul,&lt;br /&gt;
.toclimit-7 .toclevel-6 ul {&lt;br /&gt;
	display: none;&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=7113</id>
		<title>Programmer Guide/Shell Items/Table/SET TABLE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Table/SET_TABLE&amp;diff=7113"/>
		<updated>2014-05-15T09:24:18Z</updated>

		<summary type="html">&lt;p&gt;Admin: /* {{anchor|FIND|Finding table entries}} */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;amp;hellip;&amp;lt;/code&amp;gt; command is used to modify a table item. The sub-commands documented here are valid for all table types, unless otherwise specified.&lt;br /&gt;
&lt;br /&gt;
== Setting or Adding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;amp;hellip; [ /Tag | /Untag ]&lt;br /&gt;
&lt;br /&gt;
When using the index of an &#039;&#039;existing&#039;&#039; entry for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the command will modify the respective entry. When supplying the asterisk, &amp;amp;quot;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&amp;amp;quot;, for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, a &#039;&#039;new entry&#039;&#039; will be appended to the end of the table. Finally, when supplying a value for &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; that is &#039;&#039;greater&#039;&#039; than the number of entries (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&amp;lt;code&amp;gt;[]&amp;lt;/code&amp;gt;), the table will be padded with an appropriate number of empty entries in order to allow the entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; to be set.&lt;br /&gt;
&lt;br /&gt;
The options &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt; may be used for setting or clearing the tag flag.&lt;br /&gt;
&lt;br /&gt;
Remember that with {{STX}} table indexes are always zero-based.&lt;br /&gt;
&lt;br /&gt;
=== Unstructured adding ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; [ /Tag|Untag ]&lt;br /&gt;
&lt;br /&gt;
This statement is the sole way of adding entries to a simple table. The statement is applicable to extended tables, too. With extended tables, the field separator character may be used to separate fields in the string &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;, meaning that &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt; will be parsed in the same way as entries are loaded from files.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;entryValue&amp;lt;/var&amp;gt;&lt;br /&gt;
| The value to assign to the entry.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== Adding structured data to extended tables ===&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|* &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; [ &amp;amp;hellip; &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;n&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt; ] [ /Tag|Untag ] [ /N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;|all|tagged ]&lt;br /&gt;
&lt;br /&gt;
The structured variant of setting entries allows to address the fields of an entry. It is thus applicable to extended tables only. Using the option &amp;lt;code&amp;gt;/N&amp;lt;/code&amp;gt;, you may even set multiple entries at the same time.&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;&lt;br /&gt;
| The zero-based index of an existing entry to modify the entry&#039;s data or a zero-based index greater than the number of existing entries, to add a new entry. If the index is greater than the total number of entries, then all missing entries are created and initialized with default values. An asterisk may be used to append the table with a new entry at the next free index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldId&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| A valid field id (as defined in the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; command) or a field index.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldValue&amp;lt;sub&amp;gt;1&amp;lt;/sub&amp;gt;&amp;lt;/var&amp;gt;&amp;amp;hellip;&lt;br /&gt;
| The value to assign to the respective field.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/Tag&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Untag&amp;lt;/code&amp;gt;&lt;br /&gt;
| tag, or untag, the respective entry&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
| Repeat this assignment for the next &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; entries (with &amp;lt;code&amp;gt;/N=&amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;var&amp;gt;n&amp;lt;/var&amp;gt; being an integer higher than, or equal to, 1), or for &#039;&#039;all&#039;&#039; entries from the current one to the last one (with &amp;lt;code&amp;gt;/N=all&amp;lt;/code&amp;gt;), or for all tagged entries from the current one to the last one (&amp;lt;code&amp;gt;/N=tagged&amp;lt;/code&amp;gt;). Note that the &amp;lt;code&amp;gt;all&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;tagged&amp;lt;/code&amp;gt; variants cannot append new entries to the table.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 // initialize the first field of the first 10 entries with the value 0.&lt;br /&gt;
 $#extTable 0 0 0 /N=10&lt;br /&gt;
&lt;br /&gt;
== Configuring a table field==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET table CONFIG&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]] (after all, [[Programmer_Guide/Concepts/Simple_table|simple tables]] do not have fields).&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CONFIG &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
                          [ &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
Configure a table field. Define the display format (list box and list view) and field properties. The field must have been specified in the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; command. The table must be in configuration mode (see &amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
{|class=&amp;quot;keinrahmen&amp;quot;&lt;br /&gt;
| &amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name or index of the field to be configured / updated.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or hide (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) the field in listbox and list view controls&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;&lt;br /&gt;
| Show both name and value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or value only (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) in list box controls. This is only effective if &amp;lt;var&amp;gt;show&amp;lt;/var&amp;gt; is &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;&lt;br /&gt;
| The scaling factor for numeric fields; if a numeric field is accessed in the [[Programmer Guide/Shell Items/Table/Show_Format|show format]], its value is multiplied with scale (used by both listboxes and listviews).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
| The [[Programmer Guide/Shell Items/Table/Show_Format|show format]] format string.&lt;br /&gt;
&lt;br /&gt;
For fields of type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;, the format must contain a string tag (e.g.: &amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%10.10s&amp;lt;/code&amp;gt;) For both numeric field types (&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;), the format must contain a float tag (&amp;lt;code&amp;gt;%f&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;%g&amp;lt;/code&amp;gt;). The float tag is necessary for integer values because the scaling factor (&amp;lt;var&amp;gt;scale&amp;lt;/var&amp;gt;) is a floating number.&lt;br /&gt;
&lt;br /&gt;
Note that to display an integer (without decimals) you can use the format tag &amp;lt;code&amp;gt;%5.0f&amp;lt;/code&amp;gt;. This parameter controls the format for listboxes and listviews dialog controls.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mmode&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;|&amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;) missing value replacement. Missing value replacement is disabled by default. If enabled, missing values are replaced by &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;mval&amp;lt;/var&amp;gt;&lt;br /&gt;
| The numeric id value of a &#039;missing value&#039; (e.g. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for f0 data). The default is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. Missing value replacement only works for numerical fields (&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;).&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;msym&amp;lt;/var&amp;gt;&lt;br /&gt;
| The replacement symbol (string) for missing values (e.g. &amp;lt;code&amp;gt;UNVOICED&amp;lt;/code&amp;gt; for f0 data). The strings &amp;lt;code&amp;gt;&amp;lt;empty&amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;lt;blank&amp;gt;&amp;lt;/code&amp;gt; can be used to replace a missing value with an empty string or a blank character. The default string is the empty string.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;header&amp;lt;/var&amp;gt;&lt;br /&gt;
| The text to be displayed in the field&#039;s column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;width&amp;lt;/var&amp;gt;&lt;br /&gt;
| The width (in characters) of the column of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;align&amp;lt;/var&amp;gt;&lt;br /&gt;
| Align field left (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or right (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) in the column of a listview control; The first column of a listview is always. left-aligned (align is ignored)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;sort&amp;lt;/var&amp;gt;&lt;br /&gt;
| Enable (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;) or disable (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) the sort function of the column header of a listview control.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt;&lt;br /&gt;
| If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table is NOT editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. If &amp;lt;var&amp;gt;editable&amp;lt;/var&amp;gt; is set to a number different from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, the respective field (column) of the table IS editable when the table is connected to a &amp;lt;code&amp;gt;ListView&amp;lt;/code&amp;gt; item. See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a complete example.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&lt;br /&gt;
| The name of a table containing all permissible values for this field. If this table (&amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;) is connected to a &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; item, and the &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; parameter is specified, the &amp;lt;code&amp;gt;listview&amp;lt;/code&amp;gt; displays a combobox in the associated column, and fills the combobox with &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt;&#039;s values.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt;&lt;br /&gt;
| The field id specifying the field in &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; where the values are stored. If &amp;lt;var&amp;gt;listtable&amp;lt;/var&amp;gt; is a simple table, &amp;lt;var&amp;gt;listfield&amp;lt;/var&amp;gt; must be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;listonly&amp;lt;/var&amp;gt; parameter specifies whether this &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;&#039;s field may only use values in the list table (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;), or whether any values may be entered (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;). If &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;, then the combobox is editable.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| The &amp;lt;var&amp;gt;setdefault&amp;lt;/var&amp;gt; parameter specifies whether invalid or empty data entered whilst editing should be replaced by the default value (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;=yes, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;=no). The first value in the list table is the default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;setuserdefault&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, the last user-input for this field will be used as the respective default value.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;var&amp;gt;multirow&amp;lt;/var&amp;gt;&lt;br /&gt;
| If set to &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;ON&amp;lt;/code&amp;gt;, the field can display text in multiple rows. If set to &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;, text will be displayed in one row. The default is &amp;lt;code&amp;gt;OFF&amp;lt;/code&amp;gt;.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
A field is defined once, but can be configured as often as needed. If an argument is not supplied or set to &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;, the configuration for that parameter is not changed.See the example script &amp;lt;code&amp;gt;editabletable.sts&amp;lt;/code&amp;gt; for a detailed example.&lt;br /&gt;
&lt;br /&gt;
== Table-to-table Copy ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt; &amp;amp;hellip; ] [ /Rows /Columns ]&lt;br /&gt;
&lt;br /&gt;
Copy data from the source table &amp;lt;var&amp;gt;srcTable&amp;lt;/var&amp;gt; (a parameter table or an extended table) to the target table &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; (a table of the same kind). If fields (&amp;lt;var&amp;gt;fieldids&amp;lt;/var&amp;gt;) are specified, then only these fields are copied. Otherwise all fields of the source table are copied.&lt;br /&gt;
&lt;br /&gt;
If the command is called &#039;&#039;without&#039;&#039; supplying options &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;), then&lt;br /&gt;
# the source table must have the &#039;&#039;same format&#039;&#039;, i.e. the same fields, as the target table; and&lt;br /&gt;
# the source entries will &#039;&#039;overwrite&#039;&#039; the target entries (appending entries if necessary).&lt;br /&gt;
&lt;br /&gt;
If the command is called with either option &amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;, the command will &#039;&#039;not&#039;&#039; overwrite existing entries and fields in the target table. Rather than that, the command will &#039;&#039;modify&#039;&#039; the target table, appending source fields (which do not exist in the target table) and entries to the target table. Note that the target table must have enough undefined fields to accommodate the appended fields (i.e. fields created by &amp;lt;code&amp;gt;[[Programmer_Guide/Shell_Items/Table/NEW_TABLE|NEW TABLE]]&amp;lt;/code&amp;gt;, but yet undefined).&lt;br /&gt;
&lt;br /&gt;
Note that the &amp;lt;code&amp;gt;COPY&amp;lt;/code&amp;gt; command works only with extended and with parameter tables.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt;:The table to copy from. This must be an extended or parameter table.&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldid&amp;lt;/var&amp;gt;: An optional list of field IDs, separated by blank. If specified, only these fields are copied. If omitted, all fields are copied.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Rows&amp;lt;/code&amp;gt;: If specified, fields from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are appended to &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. The fields being copied must already be defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. Note that the field data type is not checked (i.e. number fields can be copied to string fields of the same name).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Columns&amp;lt;/code&amp;gt;: If specified, entries from &amp;lt;var&amp;gt;srctable&amp;lt;/var&amp;gt; are copied to the &#039;&#039;same&#039;&#039; entries in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;, &#039;&#039;overwriting their old value&#039;&#039;. Fields not defined in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; are automatically defined and configured. For this reason there must be enough undefined fields in &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Copying between a Table and a Value Item ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; COPY &amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt; [ /Row|Col ] [ /Write ]&lt;br /&gt;
&lt;br /&gt;
Copy data between a table and a [[Programmer_Guide/Shell_Items/Value|value object]]. If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is used, the table data is copied to the value item, otherwise (default) the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;outputName&amp;lt;/var&amp;gt;: The name of a value item to copy to or from.&lt;br /&gt;
;&amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;: The entry index.&lt;br /&gt;
;&amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;: The field index.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Row&amp;lt;/code&amp;gt;: Copy table fields starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt; field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of fields copied is determined by the size of the vector. The number of rows copied is determined by the number of vectors (only for array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Col&amp;lt;/code&amp;gt;: Copy table entries starting at row &amp;lt;var&amp;gt;i&amp;lt;/var&amp;gt;, field &amp;lt;var&amp;gt;j&amp;lt;/var&amp;gt;. The number of rows copied is determined by the size of the vector. The number of fields copied is determined by the number of vectors (array value items). This option is only for array and vector value items.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: If the option &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; is specified, the table data is copied to the value item. If omitted, the value item data is copied to the table.&lt;br /&gt;
&lt;br /&gt;
== Copying to and fro the clipboard ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD [ /Show|Write ]&lt;br /&gt;
&lt;br /&gt;
Copy the visible entries of a table to the clipboard. The entries can be copied either in:&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Show_Format|show-format]], i.e. using listbox display format, when supplying the &amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt; option (or no option at all, since this is the default); or in&lt;br /&gt;
# [[Programmer_Guide/Shell_Items/Table/Introducing_Table_Items#Write_Format|write-format]], i.e. the format normally used when writing to a file. This is done with the &amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt; option.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;/Show&amp;lt;/code&amp;gt;: Use the [[Programmer Guide/Shell Items/Table/Show_Format|show format]] to format each entry string. This is the default.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Write&amp;lt;/code&amp;gt;: Use the [[Programmer Guide/Shell Items/Table/Write_Format|write format]] to format each entry string.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; CLIPBOARD /Read [ /Delete ] [ /Empty ]&lt;br /&gt;
&lt;br /&gt;
Read the last entry from the clipboard. This will work only if the format of the respective clipboard entry is either Unicode (&amp;lt;code&amp;gt;CF_UNICODETEXT&amp;lt;/code&amp;gt;) or text (&amp;lt;code&amp;gt;CF_TEXT&amp;lt;/code&amp;gt;).&lt;br /&gt;
;&amp;lt;code&amp;gt;/Read&amp;lt;/code&amp;gt;: Mandatory option.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Delete&amp;lt;/code&amp;gt;: Delete the table entries before reading from the clipboard.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Empty&amp;lt;/code&amp;gt;: Empty the clipboard after a successful read.&lt;br /&gt;
&lt;br /&gt;
== Defining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;* type name&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;count offset&amp;lt;/var&amp;gt;] [/Auto] [/Undefine]&lt;br /&gt;
&lt;br /&gt;
Note that the table must be in configuration mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]]). Define the data type and name of field &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt; (0 .. number of fields - 1). If an asterisk &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039; is given instead of &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;, the first free (undefined) index is used. The argument &amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt; is the id of the data type of the field. The argument &amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; is the name to be assigned to the field and must be a valid name string. The parameters &amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; can be used to define multiple fields with one command (&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt; = number of fields, &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; = base index). The option /Auto ensures the name is unique by concatenating the string name with an index (first value: 1). Note that once you have configured the table, you need to switch to DATA mode (see [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] below).&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE&amp;lt;/code&amp;gt; command is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]], since only they support different types of fields.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;: The index of the field to be defined or &#039;*&#039; for the next free index.&lt;br /&gt;
;&amp;lt;var&amp;gt;type&amp;lt;/var&amp;gt;: The type of data to be stored. The following values are supported:&lt;br /&gt;
:&amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; - Strings which are valid names.&lt;br /&gt;
:&amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt; - Free text.&lt;br /&gt;
:&amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt; - Integer numbers.&lt;br /&gt;
:&amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt; - Floating point numbers.&lt;br /&gt;
;&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt;: The name to assign to the field. Note that this must also be a valid name.&lt;br /&gt;
;&amp;lt;var&amp;gt;count&amp;lt;/var&amp;gt;: The number of fields to define. Used in conjunction with &amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt; for multiple definitions. Must be &amp;gt;= &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
;&amp;lt;var&amp;gt;offset&amp;lt;/var&amp;gt;: The index to start multiple definitions with. Must be &amp;gt;= &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Undefining a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;|&amp;lt;var&amp;gt;name&amp;lt;/var&amp;gt; [&amp;amp;hellip; /Undefine]&lt;br /&gt;
&lt;br /&gt;
Undefine an existing field and delete contents of all field entries. Multiple undefines are possible by using the option &amp;lt;code&amp;gt;/Undefine&amp;lt;/code&amp;gt; in conjunction with multiple parameters.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;index|name&amp;lt;/var&amp;gt;: The index or name of the field(s) to undefine.&lt;br /&gt;
&lt;br /&gt;
== Renaming a table field ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; DEFINE &amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt; /Rename&lt;br /&gt;
&lt;br /&gt;
Rename an existing field.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;fieldName&amp;lt;/var&amp;gt;: The existing field name.&lt;br /&gt;
;&amp;lt;var&amp;gt;newName&amp;lt;/var&amp;gt;: The new field name&lt;br /&gt;
;&amp;lt;code&amp;gt;/R&amp;lt;/code&amp;gt;&lt;br /&gt;
:The mandatory option &amp;lt;code&amp;gt;/Rename&amp;lt;/code&amp;gt;, specifying that this &amp;lt;code&amp;gt;DEFINE&amp;lt;/code&amp;gt; command should rename the field.&lt;br /&gt;
&lt;br /&gt;
An example can be found in the macro file &amp;lt;code&amp;gt;table_redefine.sts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Deleting table entries ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;] /Delete&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Delete all visible entries or the specified entry &amp;lt;var&amp;gt;index&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== {{anchor|FIND|Finding table entries}} ==&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function implements a simple &#039;database query&#039; interface for tables. To create complex queries, it may be necessary to apply a set of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;s and possibly combine them with the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/FIND|FIND]]&amp;lt;/code&amp;gt; command. The &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function only searches tagged entries. Therefore, if you want to search the whole table, you must tag all the entries first. At the end of a query (any number of &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; function calls), the tagged entries are those matching the search criteria.&lt;br /&gt;
&lt;br /&gt;
SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND&lt;br /&gt;
&lt;br /&gt;
Initialize a new find cycle. The tag flag of all entries are set and visibility is set to ALL. This command should be issued before a new query consisting of multiple commands is started. Instead of this command the option /Start can be used with the (first) &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FIND &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;loper cexpr&amp;lt;/var&amp;gt; ...] [/Start /Invert /Tagged]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Search for all tagged entries matching the criteria defined by the &amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt; and &amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt; arguments. The tag flags of all not matching entries are cleared. The logical operators are evaluated strictly from left to right. This means the result of all expressions of the left side of an operator is combined with the result of the expression on the right side. The logical operators &amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; (=&amp;amp;&amp;amp;), &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; (=||) and &amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; (=^^) are defined. Note that the field value for simple tables is &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cexpr&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The expression defining one search criterion (see Find expressions for details).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;loper&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The logical operator combining two search criteria; logical operators are applied from left to right, bracketing is not possible. The following operators are supported:&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt; - conjunction&lt;br /&gt;
&amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;||&amp;lt;/code&amp;gt; - disjunction&lt;br /&gt;
&amp;lt;code&amp;gt;XOR&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;^^&amp;lt;/code&amp;gt; - exclusive disjunction&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Start&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Initialize a new find cycle (this is like a call to &amp;lt;code&amp;gt;FIND&amp;lt;/code&amp;gt; without arguments and is applied before query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Invert&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Invert all tag flags (applied after query).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/Tagged&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Switch to visibility &amp;quot;tagged&amp;quot; (applied after query).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// search for entries where key field ends with &#039;ing&#039;&lt;br /&gt;
// and show only tagged entries&lt;br /&gt;
$#t find &#039;key:=I:*ing&#039; /Tagged&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== {{Anchor|FINDEXPR|Find expressions}} ==&lt;br /&gt;
{{:Programmer_Guide/General_Descriptions/Find_Expressions}}&lt;br /&gt;
&lt;br /&gt;
== Regular expressions ==&lt;br /&gt;
&lt;br /&gt;
S_TOOLS&amp;lt;nowiki&amp;gt;-&amp;lt;/nowiki&amp;gt;STx supports searches using POSIX regular expression. When using regular expressions, characters which have a special meaning in {{STX}} will need to be escaped using the {{STX}} escape character &amp;quot;&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid:cond:regex&lt;br /&gt;
|Match the value of a string field (type &amp;lt;code&amp;gt;NAME&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;STRING&amp;lt;/code&amp;gt;).{|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|fieldid&lt;br /&gt;
|name or index of a string field (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; for simple tables)&lt;br /&gt;
|-&lt;br /&gt;
|cond&lt;br /&gt;
|=RI&lt;br /&gt;
|matching regular expression ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|=RR&lt;br /&gt;
|matching regular expression respecting case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RI&lt;br /&gt;
|not matching regular expression even if ignoring case&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
|!RR&lt;br /&gt;
|not matching regular expression if respecting case.&lt;br /&gt;
|-&lt;br /&gt;
|regex&lt;br /&gt;
|a POSIX regular expression.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The script &amp;lt;code&amp;gt;regular_expressions.sts&amp;lt;/code&amp;gt; provides examples of usage.&lt;br /&gt;
&lt;br /&gt;
== Formatting table fields ==&lt;br /&gt;
&lt;br /&gt;
Formatting is only applicable to [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; FORMAT &amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;numfmt &amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Configuration of the write format used to save and load tables from files (see [[XXX|&amp;lt;code&amp;gt;SET file LOAD&amp;lt;/code&amp;gt;]] and [[XXX|&amp;lt;code&amp;gt;SET file SAVE&amp;lt;/code&amp;gt;]]). You can configure the [[Programmer Guide/Shell Items/Table/Show_Format|show format]] (used to display tables in the GUI) using the [[XXX|&amp;lt;code&amp;gt;CONFIG&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
:&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Store all fields even if they are empty. Assigned fields have the format &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt; and empty fields have just the &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;10.0 ; 10.1 ; ; 10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:&amp;lt;code&amp;gt;1 &amp;lt;/code&amp;gt; - Only assigned fields are stored. Every assigned field outputs the following string &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt; &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; &amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;. E.g.: &amp;lt;code&amp;gt;c0=10.0 ; c1=10.1 ; c2= ; c3=10.3&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note: In order to load a table successfully, it must be loaded using the same format setting as was used to save it.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;listdel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate fields in the output line (for both formats). The special symbol &#039;%t&#039; can be used to specify the tab character. Consecutive white spaces (blanks and tabs) are interpreted as one delimiter. E.g. &amp;quot; 1 2 3&amp;quot; is interpreted as three fields, whereas &amp;quot;:1::2:3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;vardel&amp;lt;/var&amp;gt;&lt;br /&gt;
:delimiter string used to separate the &amp;lt;code&amp;gt;fieldindex&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;fieldvalue&amp;lt;/code&amp;gt; (for format &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; only)&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;numfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
:Float format string used for all fields of type &amp;lt;code&amp;gt;NUMBER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;intfmt&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Integer (!) format string used for all fields of type &amp;lt;code&amp;gt;INTEGER&amp;lt;/code&amp;gt;. This can be any valid C string format specifier.&lt;br /&gt;
&lt;br /&gt;
You can set the decimal symbol using the [[XXX|&amp;lt;code&amp;gt;MODE&amp;lt;/code&amp;gt;]] command.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
//&lt;br /&gt;
//    Macro:          load_a_file_into_a_table.sts&lt;br /&gt;
//    Description:    load the contents of a numeric text file into a parameter&lt;br /&gt;
//                    table and displays the table if desired&lt;br /&gt;
//    Parameters:     #fileName    the file to load&lt;br /&gt;
//                    #mode        0    silent&lt;br /&gt;
//                                 1    show table&lt;br /&gt;
//                                 2    return table&lt;br /&gt;
//    Return:         0 on success, non-zero on failure&lt;br /&gt;
//    Usage:          load_a_file_into_a_table [file] ; [show]&lt;br /&gt;
//    Author:         Jonnie White&lt;br /&gt;
//    History:        2005-03-31    jw    created&lt;br /&gt;
//                    2005-04-27    jw    added new mode (return table) and file &lt;br /&gt;
//                                        parameter&lt;br /&gt;
//&lt;br /&gt;
///////////////////////////////////////////////////////////////////////////////&lt;br /&gt;
[macro load_a_file_into_a_table]&lt;br /&gt;
    #fileName := set &#039;$scriptDirectory\input_matrix_small.txt&#039;&lt;br /&gt;
    #mode := 1&lt;br /&gt;
    readvar #argv #fileName&#039;;&#039;#mode&lt;br /&gt;
&lt;br /&gt;
    // create a parameter table with 4 fields&lt;br /&gt;
    #tableItem := new table * 4 /Parameter number:f:4&lt;br /&gt;
    if &#039;$#tableItem&#039; == * em -1 ; failed to create a table&lt;br /&gt;
    &lt;br /&gt;
    // set the write format to blank separated&lt;br /&gt;
    $#tableItem format 0 &#039; &#039;&lt;br /&gt;
    &lt;br /&gt;
    // create the read-only file object associated with fileName&lt;br /&gt;
    #fileItem := new file * &#039;$#fileName&#039; /Text /Read&lt;br /&gt;
    if &#039;$#fileItem&#039; == * em -1 ; failed to open the file $#fileName&lt;br /&gt;
    &lt;br /&gt;
    // load the file into the table&lt;br /&gt;
    $#fileItem load $#tableItem&lt;br /&gt;
    if &#039;$rc&#039; &amp;gt; 0 em -1 ; failed to load file $#fileName into table $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // show the table&lt;br /&gt;
    if &#039;$#mode&#039; == 1 showitem $#tableItem&lt;br /&gt;
    &lt;br /&gt;
    // return table&lt;br /&gt;
    if &#039;$#mode&#039; == 2 then&lt;br /&gt;
        delete $#fileItem&lt;br /&gt;
        exit 1 set &#039;$#tableItem&#039;&lt;br /&gt;
    else&lt;br /&gt;
        // clean up&lt;br /&gt;
        delete $#fileItem $#tableItem&lt;br /&gt;
    end&lt;br /&gt;
exit 1 int 0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that if you need to save a table containing empty fields, you should *not* use a blank or a tab character as the delimiter. If you do, the empty fields will be omitted on loading the table.&lt;br /&gt;
&lt;br /&gt;
== Locking / Unlocking the table ==&lt;br /&gt;
&lt;br /&gt;
Table items can be locked to prevent access by shells other than the locking shell.&lt;br /&gt;
&lt;br /&gt;
See &amp;lt;code&amp;gt;lock_example.sts&amp;lt;/code&amp;gt; in the script examples directory for an example.&lt;br /&gt;
&lt;br /&gt;
=== LOCK ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; LOCK [/Save]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lock table access. If a table is locked, only the shell which locked it has access to its content. The table must be unlocked after finishing the &#039;critical&#039; processing section.&lt;br /&gt;
&lt;br /&gt;
During the execution of most table commands, the table is automatically locked temporarily to the shell (by the table command). The table is also locked temporarily to a dialog during update processes. If the table is locked with the option /Save, the tag flags and the current order and mode is saved on lock and restored with the unlock command. In this case in the critical section entries can only be modified, but not created or deleted.&lt;br /&gt;
&lt;br /&gt;
=== TRYLOCK ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; TRYLOCK [ &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; ] [ /S ]&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try to lock the table item &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt;. If no timeout is specified, &amp;lt;code&amp;gt;TRYLOCK&amp;lt;/code&amp;gt; returns immediately. If the caller already *holds* the lock, &amp;lt;code&amp;gt;TRYLOCK&amp;lt;/code&amp;gt; will fail immediately. This makes sense because, since the caller is the owner, it cannot release it whilst its waiting.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If specified, &amp;lt;code&amp;gt;TRYLOCK&amp;lt;/code&amp;gt; will try to get a lock once per millisecond until it is either successful, or &amp;lt;var&amp;gt;timeout&amp;lt;/var&amp;gt; milliseconds have elapsed.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;/S&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:If specified, errors will generate warning messages rather than error messages. See The Silent Flag for details.&lt;br /&gt;
&lt;br /&gt;
Return Codes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - an unlocked table has been successfully locked.&lt;br /&gt;
&amp;lt;code&amp;gt;381&amp;lt;/code&amp;gt; - Error: if the table could not be locked due to it being locked by someone else.&lt;br /&gt;
&amp;lt;code&amp;gt;382&amp;lt;/code&amp;gt; - Warning: identical to &amp;lt;code&amp;gt;381&amp;lt;/code&amp;gt;, except that this returned when the /S flag is specified.&lt;br /&gt;
&amp;lt;code&amp;gt;383&amp;lt;/code&amp;gt; - Error: if the table could not be locked due to it being locked by the caller.&lt;br /&gt;
&amp;lt;code&amp;gt;384&amp;lt;/code&amp;gt; - Warning: identical to &amp;lt;code&amp;gt;383&amp;lt;/code&amp;gt;, except that this returned when the /S flag is specified.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
&amp;quot;&amp;lt;code&amp;gt;SET $#table TRYLOCK 5000&amp;lt;/code&amp;gt;&amp;quot; will try hard to lock the table. If it does not succeed within 5000ms (i.e., five seconds), it will fail - but it will not fail earlier.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;TRYLOCK&amp;lt;/code&amp;gt; command is intended for safe multithreading without race conditions occurring&lt;br /&gt;
&lt;br /&gt;
=== UNLOCK ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; UNLOCK&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Unlock table access.&lt;br /&gt;
&lt;br /&gt;
== Setting the table mode ==&lt;br /&gt;
&lt;br /&gt;
This command is only applicable for [[Programmer_Guide/Concepts/Extended_table|extended tables]].&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; MODE &amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;access format decimal&amp;lt;/var&amp;gt;]&lt;br /&gt;
&lt;br /&gt;
Set table mode (configuration / data) and general attributes.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;mode&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:A flag to switch the table mode to configuration mode (&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;) or data mode (&amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;); After creating an extended table the table may be in configuration or data mode, depending on the &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command. See &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW table]]&amp;lt;/code&amp;gt; for details.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;access&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:This argument is currently meaningless. It is reserved for future database functions and should be set to &#039;&amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&#039; or &#039;&amp;lt;code&amp;gt;*&amp;lt;/code&amp;gt;&#039;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;format&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Selects the format to be used for file I/O: &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer Guide/Shell Items/Table/Show_Format|show format]], &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;&amp;amp;hellip;[[Programmer Guide/Shell Items/Table/Write_Format|write (default) format]].&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;decimal&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Sets the character to be used as the decimal symbol. By default, the period &#039;&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&#039; is used.&lt;br /&gt;
&lt;br /&gt;
Since {{STX}} 3.7.0, the &amp;lt;code&amp;gt;[[User Guide/Workspace/Spectrum Viewer pre-configured profiles|NEW TABLE]]&amp;lt;/code&amp;gt; syntax has been modified to include the field definitions. The table mode is then automatically set to data, and hence this command may in future be pretty much obsolete, except for setting the decimal symbol.&lt;br /&gt;
&lt;br /&gt;
== Showing and hiding table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /All|Tagged&lt;br /&gt;
&lt;br /&gt;
Make either all table entries visible (&amp;lt;code&amp;gt;/All&amp;lt;/code&amp;gt;) or only tagged entries (&amp;lt;code&amp;gt;/Tagged&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
Only visible entries can be accessed, deleted or displayed (e.g. in a list box).&lt;br /&gt;
&lt;br /&gt;
== Sorting table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT [/Respect]&lt;br /&gt;
&lt;br /&gt;
Invert entry order (all tables) &amp;lt;!-- wie bitte!? --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For simple tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt; [/Respect]&lt;br /&gt;
&lt;br /&gt;
For extended tables:&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; SORT &amp;lt;var&amp;gt;fieldid dir&amp;lt;/var&amp;gt; [&amp;amp;hellip;] [/Respect]&lt;br /&gt;
&lt;br /&gt;
Sort table entries. For simple tables only the sort direction (&amp;lt;var&amp;gt;dir&amp;lt;/var&amp;gt;: Ascending (0), Descending (1)) can be selected.&lt;br /&gt;
&lt;br /&gt;
For extended tables, one or more fields and the sort direction can be specified. The sort function ignores the visibility setting and sorts all table entries. If the option &amp;lt;code&amp;gt;/Respect&amp;lt;/code&amp;gt; is used, strings are sorted respecting their case, otherwise the sort is case-insensitive.&lt;br /&gt;
&lt;br /&gt;
== Tagging table entries ==&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table&amp;lt;/var&amp;gt; /Reset|Invert&lt;br /&gt;
&lt;br /&gt;
Reset (/Reset) or invert (/Invert) tag flags of all entries and set visibility to ALL.&lt;br /&gt;
&lt;br /&gt;
 SET &amp;lt;var&amp;gt;table index&amp;lt;/var&amp;gt; /Tag|Untag|Invert&lt;br /&gt;
&lt;br /&gt;
Set, clear or invert tag flag of an entry. These options can also be used in all table commands assigning a value.&lt;br /&gt;
&lt;br /&gt;
The command &amp;lt;code&amp;gt;TAGS&amp;lt;/code&amp;gt; can be used to save and restore a table&#039;s tagged entries.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/General_Descriptions&amp;diff=7112</id>
		<title>Programmer Guide/General Descriptions</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/General_Descriptions&amp;diff=7112"/>
		<updated>2014-05-15T06:37:45Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
General Descriptions provides general information about the S_TOOLS-STx macro language and environment.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/General_Descriptions&amp;diff=7111</id>
		<title>Programmer Guide/General Descriptions</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/General_Descriptions&amp;diff=7111"/>
		<updated>2014-05-15T06:37:34Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
General Descriptions provides general information about the S_TOOLS-STx macro language and environment.&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Real_Time_Analyser&amp;diff=7104</id>
		<title>User Guide/Real Time Analyser</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Real_Time_Analyser&amp;diff=7104"/>
		<updated>2014-05-14T13:13:58Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
[[File:rtanalyser.png]]&lt;br /&gt;
&lt;br /&gt;
The {{STX}} Real-Time Analyser can analyse mono or stereo input from any available source on the system. Three analysis displays are implemented:&lt;br /&gt;
&lt;br /&gt;
* Spectrum&lt;br /&gt;
* Spectrogram&lt;br /&gt;
* Waterfall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Real_Time_Analyser&amp;diff=7103</id>
		<title>User Guide/Real Time Analyser</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide/Real_Time_Analyser&amp;diff=7103"/>
		<updated>2014-05-14T13:13:35Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
[[File:rtanalyser.png]]&lt;br /&gt;
&lt;br /&gt;
The {{STX}} Real-Time Analyser can analyse mono or stereo input from any available source on the system. Three analysis displays are implemented:&lt;br /&gt;
&lt;br /&gt;
* Spectrum&lt;br /&gt;
* Spectrogram&lt;br /&gt;
* Waterfall&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2178</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2178"/>
		<updated>2011-03-22T16:37:22Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__TOC__The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Introductions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Intro&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Commands (alphabetical list) ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Global Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Options&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2177</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2177"/>
		<updated>2011-03-22T16:36:21Z</updated>

		<summary type="html">&lt;p&gt;Admin: /* Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Introductions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Intro&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Commands (alphabetical list) ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Global Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Options&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2176</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2176"/>
		<updated>2011-03-22T16:36:10Z</updated>

		<summary type="html">&lt;p&gt;Admin: /* Intro */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Introductions ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Intro&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Global Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Options&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2175</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2175"/>
		<updated>2011-03-22T16:35:54Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Intro ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Intro&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Global Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Options&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2174</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2174"/>
		<updated>2011-03-22T16:35:25Z</updated>

		<summary type="html">&lt;p&gt;Admin: /* Options */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Global Options ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=Programmer_Guide/Command_Reference_Options&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options&amp;diff=2173</id>
		<title>Programmer Guide/Command Reference Options</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options&amp;diff=2173"/>
		<updated>2011-03-22T16:34:47Z</updated>

		<summary type="html">&lt;p&gt;Admin: Created page with &amp;#039;&amp;lt;splist parent= sort=asc sortby=title showpath=no liststyle=unordered kidsonly=yes &amp;gt;&amp;lt;/splist&amp;gt;&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/NEW&amp;diff=2172</id>
		<title>Programmer Guide/Command Reference/NEW</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/NEW&amp;diff=2172"/>
		<updated>2011-03-22T16:34:07Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
 NEW &amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt; [ [[Programmer_Guide/Command_Reference_Options/Silent|/I]] ] [ /U|/u ] [ /G ] [ /Z ] [ &amp;lt;var&amp;gt;createargs&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;createopts&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command creates a new [[Programmer_Guide/Shell_Items|shell item]] of the type &amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt; and named &amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt;: The type of the new [[Programmer_Guide/Shell_Items|shell item]]. This must be unique (in the item namespace of a shell).&lt;br /&gt;
;&amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;: The name of the new [[Programmer_Guide/Shell_Items|shell item]]. If this argument is set to the character &#039;&#039;&#039;*&#039;&#039;&#039;, the name is choosen automatically.&lt;br /&gt;
;&amp;lt;var&amp;gt;createargs&amp;lt;/var&amp;gt;: Arguments specifying parameters for the initialization of the new item. The format and meaning of these arguments are depending on the type of the new [[Programmer_Guide/Shell_Items|shell item]].&lt;br /&gt;
;&amp;lt;code&amp;gt;/I&amp;lt;/code&amp;gt;: Enable [[Programmer_Guide/Command_Reference_Options/Silent|silent error reporting]]. If specified, &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; will generate a warning rather than an error if arguments are missing or it is unable create the new item.&lt;br /&gt;
;&amp;lt;code&amp;gt;/G&amp;lt;/code&amp;gt;: Garbage collection. If specified, a temporary (or local) item created, which is automatically deleted when exiting the macro.&lt;br /&gt;
;&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;: If specified, the global item protection is enabled. This means all items created before this item (called the protection-master) are proteced from being deleted, until the global item protection is disabled, which is done by deleting the protection-master). Protected items can only be deleted using a special option of the [[Programmer_Guide/Command_Reference/DELETE|delete command]]. Note: This option is case-sensitive.&lt;br /&gt;
;&amp;lt;code&amp;gt;/u&amp;lt;/code&amp;gt;: If specified, the created item protected from being deleted. , until the global item protection is disabled, which is done by deleting the protection-master). Note: This option is case-sensitive.&lt;br /&gt;
;&amp;lt;code&amp;gt;/z&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/NEW&amp;diff=2171</id>
		<title>Programmer Guide/Command Reference/NEW</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/NEW&amp;diff=2171"/>
		<updated>2011-03-22T16:33:03Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
 NEW &amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt; [ [[Programmer_Guide/Command_Reference_Options/Silent|/I]] ] [ /U|/u ] [ /G ] [ &amp;lt;var&amp;gt;createargs&amp;lt;/var&amp;gt; ] [ &amp;lt;var&amp;gt;createopts&amp;lt;/var&amp;gt; ] ]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; command creates a new [[Programmer_Guide/Shell_Items|shell item]] of the type &amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt; and named &amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;itemtype&amp;lt;/var&amp;gt;: The type of the new [[Programmer_Guide/Shell_Items|shell item]]. This must be unique (in the item namespace of a shell).&lt;br /&gt;
;&amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;: The name of the new [[Programmer_Guide/Shell_Items|shell item]]. If this argument is set to the character &#039;&#039;&#039;*&#039;&#039;&#039;, the name is choosen automatically.&lt;br /&gt;
;&amp;lt;var&amp;gt;createargs&amp;lt;/var&amp;gt;: Arguments specifying parameters for the initialization of the new item. The format and meaning of these arguments are depending on the type of the new [[Programmer_Guide/Shell_Items|shell item]].&lt;br /&gt;
;&amp;lt;code&amp;gt;/I&amp;lt;/code&amp;gt;: Enable [[Programmer_Guide/Command_Reference_Options/Silent|silent error reporting]]. If specified, &amp;lt;code&amp;gt;NEW&amp;lt;/code&amp;gt; will generate a warning rather than an error if arguments are missing or it is unable create the new item.&lt;br /&gt;
;&amp;lt;code&amp;gt;/G&amp;lt;/code&amp;gt;: Garbage collection. If specified, a temporary (or local) item created, which is automatically deleted when exiting the macro.&lt;br /&gt;
;&amp;lt;code&amp;gt;/U&amp;lt;/code&amp;gt;: If specified, the global item protection is enabled. This means all items created before this item (called the protection-master) are proteced from being deleted, until the global item protection is disabled, which is done by deleting the protection-master). Protected items can only be deleted using a special option of the [[Programmer_Guide/Command_Reference/DELETE|delete command]]. Note: This option is case-sensitive.&lt;br /&gt;
;&amp;lt;code&amp;gt;/u&amp;lt;/code&amp;gt;: If specified, the created item protected from being deleted. , until the global item protection is disabled, which is done by deleting the protection-master). Note: This option is case-sensitive.&lt;br /&gt;
;&amp;lt;code&amp;gt;/z&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/DELETE&amp;diff=2170</id>
		<title>Programmer Guide/Command Reference/DELETE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/DELETE&amp;diff=2170"/>
		<updated>2011-03-22T16:31:38Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
 DELETE [ [[Programmer_Guide/Command_Reference_Options/Variables|/Variables]] ] [/unprotect] [ [[Programmer_Guide/Command_Reference_Options/Silent|/Silent]] ] [ [[Programmer_Guide/Command_Reference_Options/-|/-]] ] &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;itemname2...&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; command deletes the specified shell items &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;itemname2&amp;lt;/var&amp;gt;, and so on. Some types of shell items (e.g. SPU items) cannot be deleted while they are active, causing an error to be emitted. If a display item is deleted, all items contained in the display are removed too (i.e. graphs and dialogs items). If a dialog item contained in a &#039;dialog only&#039; display item is deleted, the display item is also removed. If a DDE-conversation item (DDEConv) is removed, the conversation is ended before the item is deleted.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;: The name of the shell item to delete.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Silent&amp;lt;/code&amp;gt;: If specified, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; will generate a warning rather than an error if arguments are missing or it is unable delete the arguments.&lt;br /&gt;
;&amp;lt;code&amp;gt;/unprotect&amp;lt;/code&amp;gt; (case-sensitive!): If specified, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; will remove any protection from the respective item before deleting. This is the only way of deleting a [[Programmer_Guide/Protected_item|protected shell item]]. Note that, unlike most other options, the &amp;lt;code&amp;gt;/unprotect&amp;lt;/code&amp;gt; option is case-sensitive meaning that you have to use the &#039;&#039;lower-case&#039;&#039; letter &#039;&#039;&#039;u&#039;&#039;&#039;.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Variables&amp;lt;/code&amp;gt;: Indicates that the &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt;...&amp;lt;var&amp;gt;itemnamen&amp;lt;/var&amp;gt;  arguments are variable names. In this case, each itemname is interpreted as the name of a shell item. The respective shell items are deleted, and the variables are then reset to empty.&lt;br /&gt;
&lt;br /&gt;
 // create a table item called &amp;quot;hugoItem&amp;quot;, and store&lt;br /&gt;
 // this name in a variable called &amp;quot;#hugo&amp;quot;&lt;br /&gt;
 #hugo := new table hugoItem&lt;br /&gt;
 &lt;br /&gt;
 // table item &amp;quot;hugoItem&amp;quot; will be deleted *and* &amp;quot;#hugo&amp;quot; will be cleared&lt;br /&gt;
 delete /Var #hugo&lt;br /&gt;
&amp;lt;!-- C.G. 21.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/Variables&amp;diff=2168</id>
		<title>Programmer Guide/Command Reference Options/Variables</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/Variables&amp;diff=2168"/>
		<updated>2011-03-22T16:30:44Z</updated>

		<summary type="html">&lt;p&gt;Admin: moved Programmer Guide/Command Reference Intro/Variables to Programmer Guide/Command Reference Options/Variables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Many STx commands expecting the name of an STx item as their arguments support the &amp;lt;code&amp;gt;/Variables&amp;lt;/code&amp;gt; option. This option indicates that the arguments to the respective command are the names of STx variables, each containing the name of an STx item to delete. In this case, not only the respective items are being deleted, but also the respective variables are then reset to empty.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/Silent&amp;diff=2166</id>
		<title>Programmer Guide/Command Reference Options/Silent</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/Silent&amp;diff=2166"/>
		<updated>2011-03-22T16:30:19Z</updated>

		<summary type="html">&lt;p&gt;Admin: moved Programmer Guide/Command Reference Intro/Silent to Programmer Guide/Command Reference Options/Silent&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Many STX commands support the &amp;lt;code&amp;gt;/Silent&amp;lt;/code&amp;gt; option. Where available, this option leads to exceptional situations being reported as warnings instead of errors.&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
* There are a few commands where, before introducing the &#039;&#039;silent&#039;&#039; option, the &amp;lt;code&amp;gt;/S&amp;lt;/code&amp;gt; flag had already been assigned to a different option. In order not to break existing user code, for the respective commands, the &#039;&#039;silent&#039;&#039; flag is indicated by a different letter (e.g. &amp;lt;code&amp;gt;/L&amp;lt;/code&amp;gt; for the [[Programmer_Guide/Command_Reference/LOAD|LOAD]] command or &amp;lt;code&amp;gt;/I&amp;lt;/code&amp;gt; for the [[Programmer_Guide/Command_Reference/NEW|NEW]]).&lt;br /&gt;
* Since version 4.0 the general flag &amp;lt;code&amp;gt;/?&amp;lt;/code&amp;gt; can be used to specifiy the &#039;&#039;silent&#039;&#039; option. This general flag was implemeted to simpliy script programming.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- C.G. 15.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/-&amp;diff=2164</id>
		<title>Programmer Guide/Command Reference Options/-</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/-&amp;diff=2164"/>
		<updated>2011-03-22T16:29:56Z</updated>

		<summary type="html">&lt;p&gt;Admin: moved Programmer Guide/Command Reference Intro/- to Programmer Guide/Command Reference Options/-&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;lt;code&amp;gt;/-&amp;lt;/code&amp;gt; &#039;&#039;end of options&#039;&#039; switch is available for every S_TOOLS-STx command that accepts flags. With the &#039;&#039;end of options&#039;&#039; switch, you indicate that any following arguments should be interpreted as plain arguments, even if they should start with a slash.&lt;br /&gt;
&lt;br /&gt;
For example, the following command will cause an error:&lt;br /&gt;
 WRITELOG This /command/ will cause an error&lt;br /&gt;
The reason is that the slash in front of the string &amp;lt;code&amp;gt;/command/&amp;lt;/code&amp;gt; causes the string to be interpreted as the option &amp;lt;code&amp;gt;/C&amp;lt;/code&amp;gt;, and there is no such option for the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/WRITELOG|WRITELOG]]&amp;lt;/code&amp;gt; command. (And if there were, the text shown by the respective &amp;lt;code&amp;gt;WRITELOG&amp;lt;/code&amp;gt; would be &amp;quot;This will cause an error&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
To make the above example work (and, especially, actually show the string &amp;quot;This /command/ works&amp;quot;), you will have to use the following statement:&lt;br /&gt;
 WRITELOG /- This /command/ works&lt;br /&gt;
&amp;lt;!-- C.G. 15.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2162</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2162"/>
		<updated>2011-03-22T16:28:55Z</updated>

		<summary type="html">&lt;p&gt;Admin: /* Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&amp;lt;/splist&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
XXX&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2161</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2161"/>
		<updated>2011-03-22T16:28:39Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
XXX&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2160</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2160"/>
		<updated>2011-03-22T16:28:25Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Commands ==&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/DELETE&amp;diff=2159</id>
		<title>Programmer Guide/Command Reference/DELETE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/DELETE&amp;diff=2159"/>
		<updated>2011-03-22T16:26:03Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
 DELETE [ [[Programmer_Guide/Command_Reference_Intro/Variables|/Variables]] ] [/unprotect] [ [[Programmer_Guide/Command_Reference_Intro/Silent|/Silent]] ] [ [[Programmer_Guide/Command_Reference_Intro/-|/-]] ] &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;itemname2...&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; command deletes the specified shell items &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;itemname2&amp;lt;/var&amp;gt;, and so on. Some types of shell items (e.g. SPU items) cannot be deleted while they are active, causing an error to be emitted. If a display item is deleted, all items contained in the display are removed too (i.e. graphs and dialogs items). If a dialog item contained in a &#039;dialog only&#039; display item is deleted, the display item is also removed. If a DDE-conversation item (DDEConv) is removed, the conversation is ended before the item is deleted.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;: The name of the shell item to delete.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Silent&amp;lt;/code&amp;gt;: If specified, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; will generate a warning rather than an error if arguments are missing or it is unable delete the arguments.&lt;br /&gt;
;&amp;lt;code&amp;gt;/unprotect&amp;lt;/code&amp;gt; (case-sensitive!): If specified, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; will remove any protection from the respective item before deleting. This is the only way of deleting a [[Programmer_Guide/Protected_item|protected shell item]]. Note that, unlike most other options, the &amp;lt;code&amp;gt;/unprotect&amp;lt;/code&amp;gt; option is case-sensitive meaning that you have to use the &#039;&#039;lower-case&#039;&#039; letter &#039;&#039;&#039;u&#039;&#039;&#039;.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Variables&amp;lt;/code&amp;gt;: Indicates that the &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt;...&amp;lt;var&amp;gt;itemnamen&amp;lt;/var&amp;gt;  arguments are variable names. In this case, each itemname is interpreted as the name of a shell item. The respective shell items are deleted, and the variables are then reset to empty.&lt;br /&gt;
&lt;br /&gt;
 // create a table item called &amp;quot;hugoItem&amp;quot;, and store&lt;br /&gt;
 // this name in a variable called &amp;quot;#hugo&amp;quot;&lt;br /&gt;
 #hugo := new table hugoItem&lt;br /&gt;
 &lt;br /&gt;
 // table item &amp;quot;hugoItem&amp;quot; will be deleted *and* &amp;quot;#hugo&amp;quot; will be cleared&lt;br /&gt;
 delete /Var #hugo&lt;br /&gt;
&amp;lt;!-- C.G. 21.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/-&amp;diff=2157</id>
		<title>Programmer Guide/Command Reference Options/-</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/-&amp;diff=2157"/>
		<updated>2011-03-22T16:25:27Z</updated>

		<summary type="html">&lt;p&gt;Admin: moved Programmer Guide/Command Reference/- to Programmer Guide/Command Reference Intro/-&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The &amp;lt;code&amp;gt;/-&amp;lt;/code&amp;gt; &#039;&#039;end of options&#039;&#039; switch is available for every S_TOOLS-STx command that accepts flags. With the &#039;&#039;end of options&#039;&#039; switch, you indicate that any following arguments should be interpreted as plain arguments, even if they should start with a slash.&lt;br /&gt;
&lt;br /&gt;
For example, the following command will cause an error:&lt;br /&gt;
 WRITELOG This /command/ will cause an error&lt;br /&gt;
The reason is that the slash in front of the string &amp;lt;code&amp;gt;/command/&amp;lt;/code&amp;gt; causes the string to be interpreted as the option &amp;lt;code&amp;gt;/C&amp;lt;/code&amp;gt;, and there is no such option for the &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/WRITELOG|WRITELOG]]&amp;lt;/code&amp;gt; command. (And if there were, the text shown by the respective &amp;lt;code&amp;gt;WRITELOG&amp;lt;/code&amp;gt; would be &amp;quot;This will cause an error&amp;quot;.)&lt;br /&gt;
&lt;br /&gt;
To make the above example work (and, especially, actually show the string &amp;quot;This /command/ works&amp;quot;), you will have to use the following statement:&lt;br /&gt;
 WRITELOG /- This /command/ works&lt;br /&gt;
&amp;lt;!-- C.G. 15.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/DELETE&amp;diff=2156</id>
		<title>Programmer Guide/Command Reference/DELETE</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/DELETE&amp;diff=2156"/>
		<updated>2011-03-22T16:24:36Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
 DELETE [ [[Programmer_Guide/Command_Reference_Intro/Variables|/Variables]] ] [/unprotect] [ [[Programmer_Guide/Command_Reference_Intro/Silent|/Silent]] ] [ [[Programmer_Guide/Command_Reference/-|/-]] ] &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt; [ &amp;lt;var&amp;gt;itemname2...&amp;lt;/var&amp;gt; ]&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; command deletes the specified shell items &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt;, &amp;lt;var&amp;gt;itemname2&amp;lt;/var&amp;gt;, and so on. Some types of shell items (e.g. SPU items) cannot be deleted while they are active, causing an error to be emitted. If a display item is deleted, all items contained in the display are removed too (i.e. graphs and dialogs items). If a dialog item contained in a &#039;dialog only&#039; display item is deleted, the display item is also removed. If a DDE-conversation item (DDEConv) is removed, the conversation is ended before the item is deleted.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;itemname&amp;lt;/var&amp;gt;: The name of the shell item to delete.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Silent&amp;lt;/code&amp;gt;: If specified, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; will generate a warning rather than an error if arguments are missing or it is unable delete the arguments.&lt;br /&gt;
;&amp;lt;code&amp;gt;/unprotect&amp;lt;/code&amp;gt; (case-sensitive!): If specified, &amp;lt;code&amp;gt;DELETE&amp;lt;/code&amp;gt; will remove any protection from the respective item before deleting. This is the only way of deleting a [[Programmer_Guide/Protected_item|protected shell item]]. Note that, unlike most other options, the &amp;lt;code&amp;gt;/unprotect&amp;lt;/code&amp;gt; option is case-sensitive meaning that you have to use the &#039;&#039;lower-case&#039;&#039; letter &#039;&#039;&#039;u&#039;&#039;&#039;.&lt;br /&gt;
;&amp;lt;code&amp;gt;/Variables&amp;lt;/code&amp;gt;: Indicates that the &amp;lt;var&amp;gt;itemname1&amp;lt;/var&amp;gt;...&amp;lt;var&amp;gt;itemnamen&amp;lt;/var&amp;gt;  arguments are variable names. In this case, each itemname is interpreted as the name of a shell item. The respective shell items are deleted, and the variables are then reset to empty.&lt;br /&gt;
&lt;br /&gt;
 // create a table item called &amp;quot;hugoItem&amp;quot;, and store&lt;br /&gt;
 // this name in a variable called &amp;quot;#hugo&amp;quot;&lt;br /&gt;
 #hugo := new table hugoItem&lt;br /&gt;
 &lt;br /&gt;
 // table item &amp;quot;hugoItem&amp;quot; will be deleted *and* &amp;quot;#hugo&amp;quot; will be cleared&lt;br /&gt;
 delete /Var #hugo&lt;br /&gt;
&amp;lt;!-- C.G. 21.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/COND&amp;diff=2155</id>
		<title>Programmer Guide/Command Reference/COND</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/COND&amp;diff=2155"/>
		<updated>2011-03-22T16:23:58Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
The &amp;lt;code&amp;gt;COND&amp;lt;/code&amp;gt; command performs a conditional assignment.&lt;br /&gt;
&lt;br /&gt;
Generally, the conditional assignment takes the following form:&lt;br /&gt;
 target := COND condition ? expr1 : expr2&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt;: is a normal assignment target, usually the name of an S_TOOLS-STx variable, e.g. &amp;lt;code&amp;gt;#var&amp;lt;/code&amp;gt;.&lt;br /&gt;
;&amp;lt;code&amp;gt;condition&amp;lt;/code&amp;gt;: is a [[Programmer_Guide/Command_Reference_Intro/condition|conditional expression]] like used with the &amp;lt;code&amp;gt;[[User Guide/Workspace/Parameter Processing|IF]]&amp;lt;/code&amp;gt; statement and the miscellaneous loop commands, e.g. the string &amp;lt;code&amp;gt;$#a == 7 || $#a == 42&amp;lt;/code&amp;gt; (for more examples, see the &amp;lt;code&amp;gt;[[User Guide/Workspace/Parameter Processing|IF]]&amp;lt;/code&amp;gt; statement).&lt;br /&gt;
:Note that with conditional S_TOOLS-STx expressions there must always be intervening whitespaces between operators and their arguments (unless the argument is quoted). So, both &amp;lt;code&amp;gt;$#a == 7&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&#039;$#a&#039;==&#039;7&#039;&amp;lt;/code&amp;gt; are valid expression, whereas &amp;lt;code&amp;gt;$#a==7&amp;lt;/code&amp;gt; is not.&lt;br /&gt;
;&amp;lt;code&amp;gt;expr1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;expr2&amp;lt;/code&amp;gt;: Both &amp;lt;code&amp;gt;expr1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;expr2&amp;lt;/code&amp;gt; may be any expressions that may be normally used in an S_TOOLS-STx &amp;lt;code&amp;gt;:=&amp;lt;/code&amp;gt; assignment, with the only exception of a &amp;lt;code&amp;gt;COND&amp;lt;/code&amp;gt; expression (meaning that conditional assignments must not be nested for the time being). If, at runtime, the conditional expression &amp;lt;code&amp;gt;condition&amp;lt;/code&amp;gt; evaluates to truth, the value determined by the first expression, &amp;lt;code&amp;gt;expr1&amp;lt;/code&amp;gt;, will be assigned to &amp;lt;code&amp;gt;target&amp;lt;/code&amp;gt;. If &amp;lt;code&amp;gt;condition&amp;lt;/code&amp;gt; evaluates to falsehood, it will be the second expression, &amp;lt;code&amp;gt;expr2&amp;lt;/code&amp;gt;, that gets assigned to target.&lt;br /&gt;
&lt;br /&gt;
You may use any S_TOOLS-STx [[Programmer_Guide/Command_Reference_Intro/condition|conditional expression]] you like for &amp;lt;code&amp;gt;condition&amp;lt;/code&amp;gt;. Equally, there is no restriction on &amp;lt;code&amp;gt;expr1&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;expr2&amp;lt;/code&amp;gt;, except that they must not be built up from &amp;lt;code&amp;gt;COND&amp;lt;/code&amp;gt; expressions themselves. It is even (and also) possible to use command substitutions (&amp;lt;code&amp;gt;$(...)&amp;lt;/code&amp;gt;), nesting them as deeply as one feels inclined to.&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
* The &amp;lt;code&amp;gt;COND&amp;lt;/code&amp;gt; command is processed by the loader, and is therefore not available in the command line interface.&lt;br /&gt;
* The &amp;lt;code&amp;gt;COND&amp;lt;/code&amp;gt; command may not contain a nested &amp;lt;code&amp;gt;COND&amp;lt;/code&amp;gt; command.&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
 #min := cond $#a &amp;lt; $#b ? $#a : $#b                         // calculate minimum of #a and #b&lt;br /&gt;
 #abs := cond $#a &amp;lt; 0 ? num -$#a : $#a                      // calculate absolute value of #a&lt;br /&gt;
 #abs := cond $#a &amp;lt; 0 ? eval $#a*(-1) : $#a                 // an alternative to the above&lt;br /&gt;
 #absdiff := cond $#a &amp;gt; $#b ? eval $#a-$#b : eval $#b-$#a   // absolute difference&lt;br /&gt;
 #len := cond $(length $#a) &amp;gt; 0 ? length $#a : length $#b   // length of #a or, if empty, of #b&lt;br /&gt;
See the file &amp;lt;code&amp;gt;conditional_assignment.sts&amp;lt;/code&amp;gt; for further working examples.&lt;br /&gt;
&amp;lt;!-- C.G. 14.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/FOR&amp;diff=2154</id>
		<title>Programmer Guide/Command Reference/FOR</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/FOR&amp;diff=2154"/>
		<updated>2011-03-22T16:23:30Z</updated>

		<summary type="html">&lt;p&gt;Admin: /* FOR */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
==FOR==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;FOR [ &amp;lt;var&amp;gt;target&amp;lt;/var&amp;gt; := &amp;lt;var&amp;gt;init&amp;lt;/var&amp;gt; ] TO &amp;lt;var&amp;gt;cond&amp;lt;/var&amp;gt; STEP &amp;lt;var&amp;gt;step&amp;lt;/var&amp;gt; // commands&lt;br /&gt;
END&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Excecute the commands in the FOR loop while the condition holds true.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;target&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The incremental counter variable to initialize with the value &amp;lt;var&amp;gt;init&amp;lt;/var&amp;gt; (e.g. #i).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;init&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The value with which to initialize the counter variable &amp;lt;var&amp;gt;target&amp;lt;/var&amp;gt; (e.g. 0).&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;cond&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The condition which should be tested at the start of each loop (e.g. $#i &amp;lt; 10). See the [[Programmer Guide/Command Reference Intro/condition|condition]] topic for the condition syntax.&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;step&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:The incremental value to add to the counter variable &amp;lt;var&amp;gt;target&amp;lt;/var&amp;gt; at the end of each loop. The assignment syntax (e.g. #i := int $#i+1) is allowed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
FOR #i := 0 TO $#i &amp;lt; 10 STEP #i := int $#i+1&lt;br /&gt;
        BUTIL MSGBOX MSG; #i = $#i&lt;br /&gt;
END&lt;br /&gt;
// an example without initialisation&lt;br /&gt;
FOR TO $#x &amp;gt; $#y STEP #i := int $#i + 1&lt;br /&gt;
   // do something here ...&lt;br /&gt;
END&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/IF&amp;diff=2153</id>
		<title>Programmer Guide/Command Reference/IF</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/IF&amp;diff=2153"/>
		<updated>2011-03-22T16:23:15Z</updated>

		<summary type="html">&lt;p&gt;Admin: /* IF */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
==IF==&lt;br /&gt;
&lt;br /&gt;
There are two forms of the &amp;lt;code&amp;gt;IF&amp;lt;/code&amp;gt; syntax. The first allows the conditional execution of one command. The second allows conditional execution of multiple command within a block.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF &amp;lt;var&amp;gt;condition command&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IFNOT &amp;lt;var&amp;gt;condition command&amp;lt;/var&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conditional execution of a command. For more information on conditions see [[Programmer Guide/Command Reference_Intro/condition|condition]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;IF condition THEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ELSE IF condition THEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ELSE IFNOT condition THEN&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;ELSE&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;...&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;END&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Conditional execution of command blocks. Only the &amp;lt;code&amp;gt;IF&amp;lt;/code&amp;gt; clause is necessary, all others are optional. Both command forms &amp;lt;code&amp;gt;IF&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;IFNOT&amp;lt;/code&amp;gt; can be used. Empty clauses (without commands) are allowed. The last clause must be closed with &amp;lt;code&amp;gt;[[Programmer Guide/Command Reference/END|END]]&amp;lt;/code&amp;gt;. For more information on conditions see [[Programmer Guide/Command Reference/condition|condition]].&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Concepts/Conditional_Expressions&amp;diff=2151</id>
		<title>Programmer Guide/Concepts/Conditional Expressions</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Concepts/Conditional_Expressions&amp;diff=2151"/>
		<updated>2011-03-22T16:22:33Z</updated>

		<summary type="html">&lt;p&gt;Admin: moved Programmer Guide/Command Reference/condition to Programmer Guide/Command Reference Intro/condition&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
All commands using conditions (&amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/IF|IF]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[Programmer Guide/Command Reference/DO|DO]]&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;[[Programmer_Guide/Command_Reference/WHILE|WHILE]]&amp;lt;/code&amp;gt;) use the same syntax and evaluation rules. A condition consists of one or more comparisons which are joined with logical (binary) operators. Each comparison compares two values and can evaluate to true or false.&lt;br /&gt;
 &amp;lt;var&amp;gt;condition&amp;lt;/var&amp;gt; = &amp;lt;var&amp;gt;comparison&amp;lt;/var&amp;gt; [&amp;lt;var&amp;gt;loperator comparison loperator&amp;lt;/var&amp;gt; .. &amp;lt;var&amp;gt;comparison loperator&amp;lt;/var&amp;gt;]&lt;br /&gt;
;&amp;lt;var&amp;gt;comparison&amp;lt;/var&amp;gt;: A comparison comprising two expressions separated by a comparison operator. There are two types of comparison supported - see below for comparison operators for details. Both types of comparison can be used within one &amp;lt;code&amp;gt;IF&amp;lt;/code&amp;gt; command.&lt;br /&gt;
;&amp;lt;var&amp;gt;loperator&amp;lt;/var&amp;gt;: A logical operator, which combines the results of two comparisons. Logical operators are evaluated strictly from left to right; bracketing is not possible; it is explicitly &#039;&#039;undefined&#039;&#039; if a part of an expression that is strictly not required for judging on the truth, or falshood, of the whole expression, gets evaluated, or not.&lt;br /&gt;
&lt;br /&gt;
===Logical Operators===&lt;br /&gt;
&lt;br /&gt;
The logical operators supported by S_TOOLS-STx conditional commands are the following:&lt;br /&gt;
;&amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt;: returns true if both comparison results are true&lt;br /&gt;
;&amp;lt;code&amp;gt;&amp;amp;&amp;amp;&amp;lt;/code&amp;gt;: the same as &amp;lt;code&amp;gt;AND&amp;lt;/code&amp;gt;&lt;br /&gt;
;&amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt;: returns true if either of the comparison results are true&lt;br /&gt;
;&amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;||&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt;: the same as &amp;lt;code&amp;gt;OR&amp;lt;/code&amp;gt;&lt;br /&gt;
* Logical operators are evaluated strictly from left to right.&lt;br /&gt;
* Bracketing is &#039;&#039;not&#039;&#039; possible.&lt;br /&gt;
* It is explicitly undefined if a part of an expression that is strictly not required for judging on the truth, or falshood, of the whole expression, gets evaluated, or not. So you should &#039;&#039;not&#039;&#039; use expressions with side-effects.&lt;br /&gt;
&lt;br /&gt;
===Comparison Operators===&lt;br /&gt;
&lt;br /&gt;
S_TOOLS-STx supports two types of comparison operator:&lt;br /&gt;
# Simple comparison operators for numerical expression and case-insensitive string comparisons&amp;lt;code&amp;gt;.&amp;lt;/code&amp;gt;&lt;br /&gt;
# Pattern matching operators using wild-cards or regular expressions. These pattern matching operators may be applied to strings or, more specifically, to S_TOOLS-STx names.&lt;br /&gt;
The general syntax for a comparison is as follows:&lt;br /&gt;
 &amp;lt;var&amp;gt;expression&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;operator&amp;lt;/var&amp;gt; &amp;lt;var&amp;gt;expression&amp;lt;/var&amp;gt;&lt;br /&gt;
&lt;br /&gt;
;&amp;lt;var&amp;gt;expression&amp;lt;/var&amp;gt; :A numerical expression or a string.&lt;br /&gt;
;&amp;lt;var&amp;gt;operator&amp;lt;/var&amp;gt;: A comparison operator (see below).&lt;br /&gt;
&lt;br /&gt;
====Simple Comparison====&lt;br /&gt;
&lt;br /&gt;
A simple comparison will be numerical if both arguments are numerical. Otherwise, a case-insensitive string comparison will be performed.&lt;br /&gt;
&lt;br /&gt;
There are the following simple comparison operators:&lt;br /&gt;
; &amp;lt;code&amp;gt;==&amp;lt;/code&amp;gt; : evaluates to true if both sides are equal.&lt;br /&gt;
; &amp;lt;code&amp;gt;!=&amp;lt;/code&amp;gt; : evaluates to true if sides are not equal&lt;br /&gt;
; &amp;lt;code&amp;gt;&amp;amp;lt;&amp;lt;/code&amp;gt; : evaluates to true if the left hand side is less than the right hand side&lt;br /&gt;
; &amp;lt;code&amp;gt;&amp;amp;gt;&amp;lt;/code&amp;gt; : evaluates to true if the left hand side is greater than the right hand side&lt;br /&gt;
; &amp;lt;code&amp;gt;&amp;amp;lt;=&amp;lt;/code&amp;gt; : evaluates to true if the left hand side is less than or equal to the right hand side&lt;br /&gt;
; &amp;lt;code&amp;gt;&amp;amp;gt;=&amp;lt;/code&amp;gt; : evaluates to true if the left hand side is greater than or equal to the right hand side&lt;br /&gt;
&lt;br /&gt;
====Pattern Matching====&lt;br /&gt;
&lt;br /&gt;
The general syntax of a pattern-matching comparison is:&lt;br /&gt;
 string operator mask&lt;br /&gt;
For example:&lt;br /&gt;
 &#039;the quick brown fox&#039; !SI &#039;*brown*&#039; // search for the word &#039;brown&#039; in the left hand side string&lt;br /&gt;
&lt;br /&gt;
Note that, instead of a string, the argument to a pattern matching comparison may also be an S_TOOLS-STx name, i.e. a string subject to the syntax restrictions for S_TOOLS-STx names. You can discern the full string comparison operators from the name comparison operators by there second character which is &amp;quot;S&amp;quot; for string comparison (e.g. &amp;lt;code&amp;gt;!SI&amp;lt;/code&amp;gt;), and &amp;quot;N&amp;quot; for name comparison (e.g. &amp;lt;code&amp;gt;!NI&amp;lt;/code&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
There are two types of pattern matching supported by S_TOOLS-STx conditional commands:&lt;br /&gt;
# Wild-card pattern matching&lt;br /&gt;
# POSIX regular expression pattern matching&lt;br /&gt;
&lt;br /&gt;
===== Wild-card pattern matching =====&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=SI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if string matches pattern, ignoring the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!SI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if string does not match pattern, ignoring the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=SR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if the string matches the pattern, respecting the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!SR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if the string does not match the pattern, respecting the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=NI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if name matches pattern, ignoring the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if name does not match pattern, ignoring the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=NR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if the name matches the pattern, respecting the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!NR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returning true if the name does not match the pattern, respecting the case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== POSIX regular expression pattern matching =====&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=RSI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if the string matches the regular expression, ignoring case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!RSI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if string does not match the regular expression, ignoring the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=RSR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if the string matches the regular expression, respecting case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!RSR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if the string does not match the regular expression, respecting the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=RNI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if the name matches the regular expression, ignoring case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!RNI&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if name does not match the regular expression, ignoring the case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;=RNR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if the string matches the regular expression, respecting case&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;!RNR&amp;lt;/code&amp;gt;&lt;br /&gt;
|returns true if the name does not match the regular expression, respecting the case&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Regular expressions make heavy use of characters that have a special meaning for S_TOOLS-STx. In order to use such characters, you need to escape them with the S_TOOLS-STx escape character, &amp;quot;&amp;lt;code&amp;gt;`&amp;lt;/code&amp;gt;&amp;quot; (back-tick). The S_TOOLS-STx regular expressions are implemented using the [http://laurikari.net/tre/ TRE library].&lt;br /&gt;
&lt;br /&gt;
===Examples===&lt;br /&gt;
&lt;br /&gt;
For an example of regular expression in use, see the example script file &amp;lt;code&amp;gt;regular_expressions.sts&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;!-- C.G. 14.3.2011 --&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/Variables&amp;diff=2149</id>
		<title>Programmer Guide/Command Reference Options/Variables</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference_Options/Variables&amp;diff=2149"/>
		<updated>2011-03-22T16:22:19Z</updated>

		<summary type="html">&lt;p&gt;Admin: moved Programmer Guide/Command Reference/Variables to Programmer Guide/Command Reference Intro/Variables&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Many STx commands expecting the name of an STx item as their arguments support the &amp;lt;code&amp;gt;/Variables&amp;lt;/code&amp;gt; option. This option indicates that the arguments to the respective command are the names of STx variables, each containing the name of an STx item to delete. In this case, not only the respective items are being deleted, but also the respective variables are then reset to empty.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2148</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2148"/>
		<updated>2011-03-22T16:21:14Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2147</id>
		<title>Programmer Guide/Command Reference</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference&amp;diff=2147"/>
		<updated>2011-03-22T16:20:53Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Command Reference documents all the commands available in the S_TOOLS-STx macro language. This is with the notable exception of the shell item commands, which are documented in the chapter Shell Items.&lt;br /&gt;
&lt;br /&gt;
Note that all S_TOOLS-STx commands store their return code in the shell variable &amp;lt;code&amp;gt;rc&amp;lt;/code&amp;gt;. See Shell Environment for more details. This is in contrast to all [[User Guide/Workspace/Waveform &amp;amp; Segmentation Viewer pre-configured profiles|MACRO]] commands which store their exit value in the variable &amp;lt;code&amp;gt;result&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL&amp;diff=2023</id>
		<title>Programmer Guide/Command Reference/EVAL</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Command_Reference/EVAL&amp;diff=2023"/>
		<updated>2010-12-03T16:30:53Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide&amp;diff=2022</id>
		<title>User Guide</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=User_Guide&amp;diff=2022"/>
		<updated>2010-12-03T16:27:17Z</updated>

		<summary type="html">&lt;p&gt;Admin: Created page with &amp;#039;{{DISPLAYTITLE:{{SUBPAGENAME}}}} &amp;#039;&amp;#039;&amp;#039;Contents&amp;#039;&amp;#039;&amp;#039;  &amp;lt;splist parent= sort=asc sortby=title showpath=no liststyle=unordered kidsonly=yes &amp;gt;&amp;#039;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Main_Page&amp;diff=2021</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Main_Page&amp;diff=2021"/>
		<updated>2010-12-03T14:44:43Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;STX&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/stx/index.php/User_Guide User Guide]&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/stx/index.php/Programmer_Guide Programmer Guide]&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/sysadmin Sysadmin Wiki]&lt;br /&gt;
&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User&#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Main_Page&amp;diff=2020</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Main_Page&amp;diff=2020"/>
		<updated>2010-12-03T14:44:32Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;STX&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/stx/index.php/User_Guide User Guide]&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/stx/index.php/Programmer_Guide User Guide]&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/sysadmin Sysadmin Wiki]&lt;br /&gt;
&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User&#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Main_Page&amp;diff=2018</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Main_Page&amp;diff=2018"/>
		<updated>2010-11-25T09:20:35Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;STX&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/stx/index.php/User_Guide User Guide]&lt;br /&gt;
&lt;br /&gt;
Programmer Guide&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://mediawiki.kfs.oeaw.ac.at/sysadmin Sysadmin Wiki]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Consult the [http://meta.wikimedia.org/wiki/Help:Contents User&#039;s Guide] for information on using the wiki software.&lt;br /&gt;
&lt;br /&gt;
== Getting started ==&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list]&lt;br /&gt;
* [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ]&lt;br /&gt;
* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide&amp;diff=2019</id>
		<title>Programmer Guide</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide&amp;diff=2019"/>
		<updated>2010-11-25T09:20:33Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Programming_a_Toolbox&amp;diff=2017</id>
		<title>Programmer Guide/Programming a Toolbox</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Programming_a_Toolbox&amp;diff=2017"/>
		<updated>2010-11-18T16:32:19Z</updated>

		<summary type="html">&lt;p&gt;Admin: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
&#039;&#039;&#039;Contents&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;splist&lt;br /&gt;
parent=&lt;br /&gt;
sort=asc&lt;br /&gt;
sortby=title&lt;br /&gt;
showpath=no&lt;br /&gt;
liststyle=unordered&lt;br /&gt;
kidsonly=yes&lt;br /&gt;
&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Programming_a_Toolbox/Example_Toolbox_function&amp;diff=1992</id>
		<title>Programmer Guide/Programming a Toolbox/Example Toolbox function</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Programming_a_Toolbox/Example_Toolbox_function&amp;diff=1992"/>
		<updated>2010-11-18T16:31:59Z</updated>

		<summary type="html">&lt;p&gt;Admin: 1 revision:&amp;amp;#32;Initial import&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
==Example Toolbox function==&lt;br /&gt;
&lt;br /&gt;
The function &amp;lt;code&amp;gt;ExportSegmentsToSoundfiles&amp;lt;/code&amp;gt; exports the selected segments from the Workspace Detail to individual soundfiles. It is only available in the DataSet context.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//{{3.7.0 849}{2005.05.30  15.31.20} - automatically created version information - do not change or delete this line}&lt;br /&gt;
&lt;br /&gt;
/*&lt;br /&gt;
This is a Toolbox definition and implementation file. Load this file into the&lt;br /&gt;
STx via the Special-&amp;gt;Toolbox Function menu.&lt;br /&gt;
*/&lt;br /&gt;
&lt;br /&gt;
/*++-------------------------------------------------------------------------//&lt;br /&gt;
Function:       ExportSegmentsToSoundfiles&lt;br /&gt;
Usage:          This is a Toolbox function definition and is called&lt;br /&gt;
                by the Toolbox manager.&lt;br /&gt;
Description:    The user can select segments in the Workspace Detail and &lt;br /&gt;
                export them to individual soundfiles (one per segment).&lt;br /&gt;
                By default, soundfiles are exported to the same directory &lt;br /&gt;
                as the segment&#039;s soundfile is in and sequences are exported&lt;br /&gt;
                to the working directory.&lt;br /&gt;
Author:         Jonnie White&lt;br /&gt;
History:        2005-06-03    jw    Created&lt;br /&gt;
                2005-09-21    jw    Version: 1.0&lt;br /&gt;
--*/&lt;br /&gt;
[Function ExportSegmentsToSoundfiles]&lt;br /&gt;
// Hotkey ; Command                    ; Type  ; Context ; Applications&lt;br /&gt;
*         ; ExportSegmentsToSoundfiles ; macro ; dataset ; *&lt;br /&gt;
// Description&lt;br /&gt;
Export the selected segments to individual soundfiles&lt;br /&gt;
// Setup Variables&lt;br /&gt;
// &lt;br /&gt;
// Variable: AddToDataset&lt;br /&gt;
// Values:   0|1&lt;br /&gt;
//           0 - Do not add files to the dataset&lt;br /&gt;
//           1 - Ask the user if they want to add files to the dataset)&lt;br /&gt;
AddToDataset = 1&lt;br /&gt;
// Variable: PathFlags&lt;br /&gt;
// Values:   0|1|2|3&lt;br /&gt;
//           0 - The path should be the same as the source file. The &lt;br /&gt;
//               value of Path is ignored.&lt;br /&gt;
//           1 - The value of Path should be used, or if Path is empty,&lt;br /&gt;
//               the path of the sourcefile should be used.&lt;br /&gt;
//           2 - The path should be chosen by the user and used for&lt;br /&gt;
//               all segements&lt;br /&gt;
//           3 - The user should choose a path for each segment.&lt;br /&gt;
PathFlags = 0&lt;br /&gt;
// Variable: Path&lt;br /&gt;
// Values:   empty or a valid directory path&lt;br /&gt;
Path =&lt;br /&gt;
// Variable: FileNameFormat&lt;br /&gt;
// Values:   String constants and the keywords &amp;lt;soundfile&amp;gt; and &amp;lt;segment&amp;gt; which &lt;br /&gt;
//           are replaced with the soundfile ID and the segment ID &lt;br /&gt;
//           respectively.&lt;br /&gt;
FileNameFormat = &amp;lt;soundfile&amp;gt;.&amp;lt;segment&amp;gt; &lt;br /&gt;
&lt;br /&gt;
/*++-------------------------------------------------------------------------//&lt;br /&gt;
Macro:          ExportSegmentsToSoundfiles&lt;br /&gt;
Usage:          This is a Toolbox function implementation macro for the DataSet&lt;br /&gt;
                context&lt;br /&gt;
Description:    This Toolbox function is called in the Dataset context and&lt;br /&gt;
                exports any selected segments to soundfiles. The user can&lt;br /&gt;
                choose the file name format for the soundfiles which will be&lt;br /&gt;
                created.&lt;br /&gt;
Author:         Jonnie White&lt;br /&gt;
History:        2005-06-03    jw    Created&lt;br /&gt;
--*/&lt;br /&gt;
[Macro ExportSegmentsToSoundfiles]&lt;br /&gt;
// Parses the arguments depending on the context.&lt;br /&gt;
// This must be the first command&lt;br /&gt;
$@TBPARSE &#039;$#argv&#039;&lt;br /&gt;
// Loads the settings (if any are defined)&lt;br /&gt;
$@TBLOADSETUP &lt;br /&gt;
&lt;br /&gt;
// if there are selected segments in the DataSet context table #etab&lt;br /&gt;
if &#039;$#etab[?]&#039; == &#039;table&#039; &amp;amp;&amp;amp; &#039;$#etab[]&#039; &amp;gt; 0 &amp;amp;&amp;amp; &#039;$#etag&#039; == &#039;aseg&#039; then&lt;br /&gt;
    $BDataset Attach // attach the dataset for the duration of this function&lt;br /&gt;
    // save the position so we can restore it at the end of the function&lt;br /&gt;
    #origPos := $($BDataset SavePos)&lt;br /&gt;
    #tFiles := new table * // Add new file paths to this table&lt;br /&gt;
    while &#039;$#etab[]&#039; &amp;gt; 0 // if the user has selected any segments&lt;br /&gt;
        $BDataset SelectASeg * ; $#etab[0] // select the segment&lt;br /&gt;
        if &#039;$result&#039; == 0 then&lt;br /&gt;
            // get information about the audio set the segment is in&lt;br /&gt;
            readstr &#039;$($BDataset GetASetInfo)&#039; #&#039;;&#039;#ASetId&#039;;&#039;#&#039;;&#039;#&#039;;&#039;#ASetFilePath /Delete&lt;br /&gt;
            // get information about the id of the segment&lt;br /&gt;
            readstr &#039;$($BDataset GetSegment $#ASetIRef ; * ; ID)&#039; #ASegId&#039;;&#039;# /Delete&lt;br /&gt;
            // select the output path depending on the user&#039;s settings&lt;br /&gt;
            gosubx _SelectOutputPath&lt;br /&gt;
            // format the output path depending on the user&#039;s settings&lt;br /&gt;
            #file := $#OutputPath&#039;\&#039;$(gosubx _FormatFileName $#ASetId;$#ASegId).wav&lt;br /&gt;
            // create a wave item based on this segment and save it to file&lt;br /&gt;
            #wsrc := $($BDataset CreateWave &#039;$#ASetIRef ; $#ASegId ; *&#039;) &lt;br /&gt;
            if &#039;$#wsrc[?]&#039; == wave then&lt;br /&gt;
                if &#039;$(bsf &#039;open $#file;create;~$#wsrc[!srate];~$#wsrc[!channels]&#039;)&#039; == 0 then&lt;br /&gt;
                    #wdst := $(new wave * 0_~$#wsrc[!length])&lt;br /&gt;
                    if $rc == 0 then&lt;br /&gt;
                        if $($#wsrc copy $#wdst) == 0 $#tFiles * $#file&lt;br /&gt;
                        delete $#wdst&lt;br /&gt;
                    end&lt;br /&gt;
                    bsf &#039;close $#file&#039;&lt;br /&gt;
                else&lt;br /&gt;
                    BUtil &#039;Msgbox Msg; Failed to create the file $#file ; ToolBox $#mac Error!&#039;&lt;br /&gt;
                end&lt;br /&gt;
                $BDataset deletewave $#wsrc&lt;br /&gt;
            else&lt;br /&gt;
                BUtil &#039;Msgbox Msg; Create waveitem failed! ; ToolBox $#mac Error!&#039;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
        $#etab 0 /Delete&lt;br /&gt;
    end&lt;br /&gt;
    // Give the user the option to add the new soundfiles to the project.&lt;br /&gt;
    if &#039;$#AddToDataset&#039; &amp;gt; 0 then&lt;br /&gt;
        readstr &#039;$($BDataset DialogSelectElement Select target set for new soundfiles; single; iref; Set; 1)&#039; #targetSetRef&lt;br /&gt;
        if &#039;$#read&#039; &amp;gt; 0 then&lt;br /&gt;
            while $#tFiles[] &amp;gt; 0&lt;br /&gt;
                $BDataset AddASet &#039;$#tFiles[0];$#targetSetRef;*&#039;&lt;br /&gt;
                $#tFiles 0 /Delete&lt;br /&gt;
            end&lt;br /&gt;
            DatasetCmd RefreshAll&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    $BDataset SelectIRef $#origPos&lt;br /&gt;
    $BDataset SavePos $#origPos&lt;br /&gt;
    $BDataset Detach&lt;br /&gt;
else&lt;br /&gt;
    BUtil &#039;MsgBox Msg; Please select at least one segment and try again.; ToolBox $#mac Error!&#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
$@TBSAVESETUP        // Save the settings (if any were changed)&lt;br /&gt;
exit 1 int $#changed // #changed must be set to 1 if any data was changed (otherwise 0)&lt;br /&gt;
&lt;br /&gt;
//  The user can determine what the filename should look like, using&lt;br /&gt;
//  the keywords &amp;lt;soundfile&amp;gt; and &amp;lt;segment&amp;gt;. This function formats&lt;br /&gt;
//  the filename.&lt;br /&gt;
_FormatFileName:&lt;br /&gt;
    readvar #argv #soundfile&#039;;&#039;#segment&lt;br /&gt;
    if &#039;$#read&#039; != 2 em -1 ; Not enough argument in $#mac&lt;br /&gt;
    #name := $#FileNameFormat&lt;br /&gt;
    readstr &#039;$#name&#039; #before&#039;&amp;lt;soundfile&amp;gt;&#039;#after /Delete&lt;br /&gt;
    if &#039;$#read&#039; &amp;gt; 0 &amp;amp;&amp;amp; &#039;$#before&#039; != &#039;$#name&#039; #name := $#before&#039;$#soundfile&#039;$#after&lt;br /&gt;
    readstr &#039;$#name&#039; #before&#039;&amp;lt;segment&amp;gt;&#039;#after /Delete&lt;br /&gt;
    if &#039;$#read&#039; &amp;gt; 0 &amp;amp;&amp;amp; &#039;$#before&#039; != &#039;$#name&#039;  #name := $#before&#039;$#segment&#039;$#after&lt;br /&gt;
    exit 1 set &#039;$#name&#039;&lt;br /&gt;
&lt;br /&gt;
//  Select the output path based on the user&#039;s settings.&lt;br /&gt;
_SelectOutputPath:&lt;br /&gt;
    if &#039;$#PathFlags&#039; == 0 || &#039;$#PathFlags&#039; == 1 then&lt;br /&gt;
        // User settings path&lt;br /&gt;
        if &#039;$#PathFlags&#039; == 1 &amp;amp;&amp;amp; &#039;$#Path&#039; != &#039;&#039; then&lt;br /&gt;
            #OutputPath := $(BUtil GetDirectory $#Path)&lt;br /&gt;
            if &#039;$#OutputPath&#039; != &#039;$#Path&#039; then&lt;br /&gt;
                #Path := $(Butil DirectoryDialog Please select an existing directory ; $#Path ; Yes ; No ; No)&lt;br /&gt;
                if &#039;$#Path&#039; != &#039;&#039; then &lt;br /&gt;
                    #OutputPath := $#Path&lt;br /&gt;
                else&lt;br /&gt;
                    exit 2 // User has failed to select a path, so we will export nothing.&lt;br /&gt;
                end&lt;br /&gt;
            end&lt;br /&gt;
        // Automatic output path&lt;br /&gt;
        else&lt;br /&gt;
            if &#039;$#ASetFilePath&#039; != &#039;&#039; then // AFile&lt;br /&gt;
                readstr &#039;$(FileToolBox Tokenize $#ASetFilePath)&#039; #drive&#039;;&#039;#dir&#039;;&#039;#name&#039;;&#039;#ext /Delete&lt;br /&gt;
                #OutputPath := &#039;$#drive&#039;:&#039;$#dir&#039;&lt;br /&gt;
            else // ASeq: sequences are stored in the @WORK directory by default&lt;br /&gt;
                #OutputPath := $@WORK&#039;\&#039;&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    else if &#039;$#PathFlags&#039; == 2 || &#039;$#PathFlags&#039; == 3 then&lt;br /&gt;
        if &#039;$#OutputPath&#039; == &#039;&#039; || &#039;$#PathFlags&#039; == 3 then&lt;br /&gt;
            #OutputPath := $(butil &#039;directorydialog Export path for soundfiles; *; No; No; No&#039;)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Programming_a_Toolbox/Toolbox_function_implementation&amp;diff=1990</id>
		<title>Programmer Guide/Programming a Toolbox/Toolbox function implementation</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Programming_a_Toolbox/Toolbox_function_implementation&amp;diff=1990"/>
		<updated>2010-11-18T16:31:58Z</updated>

		<summary type="html">&lt;p&gt;Admin: 1 revision:&amp;amp;#32;Initial import&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
==Toolbox function implementation==&lt;br /&gt;
&lt;br /&gt;
The Toolbox function implementation takes place in a macro:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[MACRO tools]readvar #argv #function #argv /Dgoto cmd$#function noCmdnoCmd: exit&lt;br /&gt;
cmdFunction1:$@TBPARSE &#039;$#argv&#039;   // Parses the arguments depending on the context. This must be the first command$@TBLOADSETUP        // Loads the settings (if any are defined)/*... the function code ...*/$@TBSAVESETUP        // Save the settings (if any were changed)exit 1 int $#changed // #changed must be set to 1 if any data was changed (otherwise 0)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The function &amp;lt;code&amp;gt;@TBPARSE&amp;lt;/code&amp;gt; must be the first command in the macro function. &amp;lt;code&amp;gt;@TBPARSE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;@TBLOADSETUP&amp;lt;/code&amp;gt; convert the calling arguments and the settings into local variables.&lt;br /&gt;
&lt;br /&gt;
====@TBPARSE====&lt;br /&gt;
&lt;br /&gt;
The Toolbox function &amp;lt;code&amp;gt;@TBPARSE&amp;lt;/code&amp;gt; creates the following local variables:&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;#keyword&amp;lt;/code&amp;gt;&lt;br /&gt;
|The name of the calling context.&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;#function&amp;lt;/code&amp;gt;&lt;br /&gt;
|The name of the function which was called.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
If a failure occurs when parsing, the Toolbox function is exited.&lt;br /&gt;
&lt;br /&gt;
====@TBLOADSETUP====&lt;br /&gt;
&lt;br /&gt;
The Toolbox function &amp;lt;code&amp;gt;@TBLOADSETUP&amp;lt;/code&amp;gt; creates local variables for all setup variable definitions in the [[User Guide/Toolbox/Toolbox function definition|function definition]]. Every &amp;lt;code&amp;gt;varname = varvalue&amp;lt;/code&amp;gt; entry is converted into a local variable &amp;lt;code&amp;gt;#varname&amp;lt;/code&amp;gt; with the value &amp;lt;code&amp;gt;varvalue&amp;lt;/code&amp;gt;. Setup variables can be saved using the Toolbox function &amp;lt;code&amp;gt;@TBSAVESETUP&amp;lt;/code&amp;gt;. The setup variables are stored in the S_TOOLS-STx INI file.&lt;br /&gt;
&lt;br /&gt;
====@TBSAVESETUP====&lt;br /&gt;
&lt;br /&gt;
The Toolbox function &amp;lt;code&amp;gt;@TBSAVESETUP&amp;lt;/code&amp;gt; saves all modified setup variables in the current S_TOOLS-STx INI file.&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>