<?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/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FShell_Items%2FGraph%2FGRAPH_Examples</id>
	<title>Programmer Guide/Shell Items/Graph/GRAPH Examples - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?action=history&amp;feed=atom&amp;title=Programmer_Guide%2FShell_Items%2FGraph%2FGRAPH_Examples"/>
	<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;action=history"/>
	<updated>2026-05-06T12:01:42Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8412&amp;oldid=prev</id>
		<title>Jw at 09:10, 1 December 2015</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8412&amp;oldid=prev"/>
		<updated>2015-12-01T09:10:12Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:10, 1 December 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l7&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following scripts demonstrate some of the display, graph and dialog functionality. An alternative to the examples below is to use the macros and classes available (e.g. [[Programmer_Guide/Macro_Library/XPlot|&amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt;]] for graphs, [[Programmer_Guide/Macro_Library/ModalDialog|&amp;lt;code&amp;gt;ModalDialog&amp;lt;/code&amp;gt;]] for dialogs etc.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following scripts demonstrate some of the display, graph and dialog functionality. An alternative to the examples below is to use the macros and classes available (e.g. [[Programmer_Guide/Macro_Library/XPlot|&amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt;]] for graphs, [[Programmer_Guide/Macro_Library/ModalDialog|&amp;lt;code&amp;gt;ModalDialog&amp;lt;/code&amp;gt;]] for dialogs etc.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Basic GUI Example&lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Display a Graph and a Dialog&lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A basic script displaying an x/y plot.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;A basic script displaying an x/y plot.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8411&amp;oldid=prev</id>
		<title>Jw at 09:09, 1 December 2015</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8411&amp;oldid=prev"/>
		<updated>2015-12-01T09:09:28Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:09, 1 December 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l111&quot;&gt;Line 111:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 111:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Cursor &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Script Example&lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Display and Processing &lt;/ins&gt;Cursor &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Information&lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following {{STX}} script example demonstrates basic use of the graphical cursors.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following {{STX}} script example demonstrates basic use of the graphical cursors.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l202&quot;&gt;Line 202:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 202:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Color Settings Script Example&lt;/del&gt;===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Setting Up a Graph&#039;s Colors&lt;/ins&gt;===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following script demonstrates how to set a graphs colors, fonts etc.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The following script demonstrates how to set a graphs colors, fonts etc.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8409&amp;oldid=prev</id>
		<title>Jw at 09:07, 1 December 2015</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8409&amp;oldid=prev"/>
		<updated>2015-12-01T09:07:23Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 11:07, 1 December 2015&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l2&quot;&gt;Line 2:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 2:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Graph Item}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Graph Item}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Examples}}&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{{Examples}}&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;==Graph Examples==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The following scripts demonstrate some of the display, graph and dialog functionality. An alternative to the examples below is to use the macros and classes available (e.g. [[Programmer_Guide/Macro_Library/XPlot|&amp;lt;code&amp;gt;XPLOT&amp;lt;/code&amp;gt;]] for graphs, [[Programmer_Guide/Macro_Library/ModalDialog|&amp;lt;code&amp;gt;ModalDialog&amp;lt;/code&amp;gt;]] for dialogs etc.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Basic GUI Example===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;===Basic GUI Example===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
	<entry>
		<id>https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8407&amp;oldid=prev</id>
		<title>Jw: Created page with &quot;{{DISPLAYTITLE:{{SUBPAGENAME}}}} {{Graph Item}} {{Examples}}  ===Basic GUI Example===  A basic script displaying an x/y plot.  &lt;pre&gt; /*++ Macro:  gui_basic_example Description...&quot;</title>
		<link rel="alternate" type="text/html" href="https://mediawiki.kfs.oeaw.ac.at/stx/docs/wiki/index.php?title=Programmer_Guide/Shell_Items/Graph/GRAPH_Examples&amp;diff=8407&amp;oldid=prev"/>
		<updated>2015-12-01T09:05:43Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{DISPLAYTITLE:{{SUBPAGENAME}}}} {{Graph Item}} {{Examples}}  ===Basic GUI Example===  A basic script displaying an x/y plot.  &amp;lt;pre&amp;gt; /*++ Macro:  gui_basic_example Description...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DISPLAYTITLE:{{SUBPAGENAME}}}}&lt;br /&gt;
{{Graph Item}}&lt;br /&gt;
{{Examples}}&lt;br /&gt;
&lt;br /&gt;
===Basic GUI Example===&lt;br /&gt;
&lt;br /&gt;
A basic script displaying an x/y plot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*++&lt;br /&gt;
Macro:  gui_basic_example&lt;br /&gt;
Descriptions:&lt;br /&gt;
    Creates a basic graphical user interface,&lt;br /&gt;
Parameters:&lt;br /&gt;
    #standalone Set to 1 if the script is running on it&amp;#039;s own&lt;br /&gt;
    (i.e. not called by another script). This is the default.&lt;br /&gt;
    Otherwise set to 0.&lt;br /&gt;
Author:&lt;br /&gt;
    Jonnie White&lt;br /&gt;
History:&lt;br /&gt;
    2006-11-13  First implemented&lt;br /&gt;
    2007-10-04  Dialog button now toggles function color&lt;br /&gt;
        2009-06-25  Modernising&lt;br /&gt;
--*/&lt;br /&gt;
[macro gui_basic_example #standalone=1]&lt;br /&gt;
    //&lt;br /&gt;
    // create and configure display&lt;br /&gt;
    //&lt;br /&gt;
    #display := new display * &amp;#039;Display Title&amp;#039; 1 1 /Dialog=Above&lt;br /&gt;
    if &amp;#039;$#display[?]&amp;#039; != &amp;#039;display&amp;#039; then&lt;br /&gt;
        em -1 ; display creation failed ($emsg)&lt;br /&gt;
    end&lt;br /&gt;
    $#display enabled restore 0 0 600 600&lt;br /&gt;
    //&lt;br /&gt;
    // create spu to generate data for graph&lt;br /&gt;
    //&lt;br /&gt;
    // generate some data&lt;br /&gt;
    #nValues := 100&lt;br /&gt;
    #vector := eval fill($#nValues,0,1)&lt;br /&gt;
    // create and run spu&lt;br /&gt;
    #spu := new spu * table2output $#vector 1 0 1 /n&lt;br /&gt;
    if &amp;#039;$#spu[?]&amp;#039; != &amp;#039;spu&amp;#039; then&lt;br /&gt;
        em -1 ; spu creation failed ($emsg) &lt;br /&gt;
    end&lt;br /&gt;
    //&lt;br /&gt;
    // create and configure graph&lt;br /&gt;
    //&lt;br /&gt;
    #graph := new graph * 1 $#display 0 0&lt;br /&gt;
    if &amp;#039;$#graph[?]&amp;#039; != &amp;#039;graph&amp;#039; then&lt;br /&gt;
        em -1 ; graph creation failed ($emsg)&lt;br /&gt;
    end&lt;br /&gt;
    theGraph := $#graph // shell variable used for graph commands in message handler&lt;br /&gt;
    $#graph axis both both * yellow both both&lt;br /&gt;
    $#graph xscale 0 $#nValues-1 &amp;#039;&amp;#039; &amp;#039;X&amp;#039;&lt;br /&gt;
    $#graph yscale 0 $#nValues-1 &amp;#039;&amp;#039; &amp;#039;Y&amp;#039;&lt;br /&gt;
    $#graph y 0 $#spu.x0 xyplot 1 green lines solid 2&lt;br /&gt;
    $#graph x $#spu.x0 /a // set x data and apply all graph settings&lt;br /&gt;
    //&lt;br /&gt;
    // run spu (sending data to graph&lt;br /&gt;
    //&lt;br /&gt;
    $#spu run 1&lt;br /&gt;
    // return if this is not a standalone call&lt;br /&gt;
    // caller should clean up&lt;br /&gt;
    if &amp;#039;$#standalone&amp;#039; != 1 exit 1&lt;br /&gt;
    //&lt;br /&gt;
    // create and configure the dialog&lt;br /&gt;
    //&lt;br /&gt;
    #dialog := new menu * $#display&lt;br /&gt;
    if &amp;#039;$#dialog[?]&amp;#039; != &amp;#039;menu&amp;#039; then&lt;br /&gt;
        em -1 ; dialog creation failed ($emsg)&lt;br /&gt;
    end&lt;br /&gt;
    $#dialog $#dialog[!controls] button 0 0 &amp;#039;Toggle function color&amp;#039;&lt;br /&gt;
    $#dialog enabled restored&lt;br /&gt;
    //&lt;br /&gt;
    // process messages until display is close&lt;br /&gt;
    // by the user&lt;br /&gt;
    //        &lt;br /&gt;
    setmsghandler display $#display gui_basic_example_mh&lt;br /&gt;
    //&lt;br /&gt;
    // process dialog messages too&lt;br /&gt;
    //&lt;br /&gt;
    setmsghandler menu $#dialog gui_basic_example_mh&lt;br /&gt;
    AppMode := 1&lt;br /&gt;
    do while &amp;#039;$AppMode&amp;#039; != &amp;#039;0&amp;#039;&lt;br /&gt;
        GetMessage&lt;br /&gt;
    end&lt;br /&gt;
    setmsghandler display $#display&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    delete $#graph $#display $#dialog $#spu&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
[MACRO gui_basic_example_mh #objtype #objname #msgid #msgpar]&lt;br /&gt;
    if &amp;#039;$#objtype&amp;#039; == display || &amp;#039;$#objtype&amp;#039; == shell then&lt;br /&gt;
        if &amp;#039;$#msgid&amp;#039; == Close || &amp;#039;$#msgId&amp;#039; == Exit then&lt;br /&gt;
            AppMode := 0    &lt;br /&gt;
        end&lt;br /&gt;
    else if &amp;#039;$#objtype&amp;#039; == &amp;#039;menu&amp;#039; then&lt;br /&gt;
        if &amp;#039;$#msgid&amp;#039; == &amp;#039;command&amp;#039; &amp;amp;&amp;amp; &amp;#039;$#msgpar&amp;#039; == &amp;#039;0&amp;#039; then&lt;br /&gt;
            // toggle function color&lt;br /&gt;
            fcolor := COND &amp;#039;$fcolor&amp;#039; == &amp;#039;green&amp;#039; || &amp;#039;$fcolor&amp;#039; == &amp;#039;&amp;#039; ? &amp;#039;blue&amp;#039; : &amp;#039;green&amp;#039;&lt;br /&gt;
            $theGraph y 0 * * * $fcolor * * * /Apply&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
exit 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Cursor Script Example===&lt;br /&gt;
&lt;br /&gt;
The following {{STX}} script example demonstrates basic use of the graphical cursors.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro gui_cursors_example #standalone=1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display, graph and dialog&lt;br /&gt;
    // and configure&lt;br /&gt;
    //&lt;br /&gt;
    if &amp;#039;$#standalone&amp;#039; == 1 then&lt;br /&gt;
        if &amp;#039;$(load macrocode $scriptdirectory\gui_basic_example.sts)&amp;#039; &amp;gt; 0 em $rc ; $#mac - $emsg&lt;br /&gt;
        gui_basic_example 0&lt;br /&gt;
    end&lt;br /&gt;
    //&lt;br /&gt;
    // display cursor styles combobox in dialog&lt;br /&gt;
    // and static control for cursor position values.&lt;br /&gt;
    //&lt;br /&gt;
    cursorStyle := set &amp;#039;0&amp;#039;&lt;br /&gt;
    cursorStyleList := set &amp;#039;cross crosshair hbar vbar hbarcross vbarcross harmonic rangeselection&amp;#039;&lt;br /&gt;
    functionBound := set &amp;#039;0&amp;#039;&lt;br /&gt;
    functionBoundList := set &amp;#039;unbound bound&amp;#039;&lt;br /&gt;
    //&lt;br /&gt;
    // show cursors in graph&lt;br /&gt;
    //&lt;br /&gt;
    $myGraph cursormode both $cursorStyle on $(int $functionBound-1) off off red yellow /Apply&lt;br /&gt;
    //&lt;br /&gt;
    //    connect them with a value item, so the value can be&lt;br /&gt;
    //    extracted at any time using the syntax $cursors[!data,$#i]&lt;br /&gt;
    //&lt;br /&gt;
    myCursors := new value *&lt;br /&gt;
    if &amp;#039;$myCursors[?]&amp;#039; != &amp;#039;value&amp;#039; em -1 ; value creation failed ($emsg)&lt;br /&gt;
    $myCursors input $myGraph.cursors /Read&lt;br /&gt;
    //&lt;br /&gt;
    // return if this is not a standalone call&lt;br /&gt;
    //&lt;br /&gt;
    if &amp;#039;$#standalone&amp;#039; != 1 exit 1 // caller will clean up&lt;br /&gt;
    //&lt;br /&gt;
    // create dialog controls and show&lt;br /&gt;
    // the display&lt;br /&gt;
    //&lt;br /&gt;
    $myDialog $myDialog[!controls] combobox 0 0 &amp;#039;Cursor Style&amp;#039; cursorStyle * * cursorStyleList&lt;br /&gt;
    functionBound := set &amp;#039;0&amp;#039;&lt;br /&gt;
    functionBoundList := set &amp;#039;unbound bound&amp;#039;&lt;br /&gt;
    $myDialog $myDialog[!controls] combobox 1 0 &amp;#039;Function Bound&amp;#039; functionBound * * functionBoundList&lt;br /&gt;
    staticCtrlId := $myDialog[!controls]&lt;br /&gt;
    $myDialog $staticCtrlId static 2 0 &amp;#039;text&amp;#039; * 50 1&lt;br /&gt;
    $myDialog enabled restored /Write // update dialog    &lt;br /&gt;
    $myDisplay enabled restored 100 100 800 800&lt;br /&gt;
    //&lt;br /&gt;
    //  process messages until display is close&lt;br /&gt;
    //  by the user&lt;br /&gt;
    //&lt;br /&gt;
    setmsghandler display $myDisplay gui_cursors_example_mh&lt;br /&gt;
    setmsghandler menu $myDialog gui_cursors_example_mh&lt;br /&gt;
    setmsghandler value $myCursors gui_cursors_example_mh&lt;br /&gt;
    AppMode := 1    &lt;br /&gt;
    do while &amp;#039;$AppMode&amp;#039; != &amp;#039;0&amp;#039;&lt;br /&gt;
        GetMessage&lt;br /&gt;
    end&lt;br /&gt;
    setmsghandler display $myDisplay&lt;br /&gt;
    setmsghandler menu $myDialog&lt;br /&gt;
    setmsghandler value $myCursors&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    delete $myGraph $myDisplay $myDialog $mySpu $myCursors&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
[MACRO gui_cursors_example_mh #objtype #objname #msgid #msgpar]&lt;br /&gt;
    if &amp;#039;$#objtype&amp;#039; == display || &amp;#039;$#objtype&amp;#039; == shell then&lt;br /&gt;
        if &amp;#039;$#msgid&amp;#039; == Close || &amp;#039;$#msgId&amp;#039; == Exit then&lt;br /&gt;
            AppMode := 0    &lt;br /&gt;
        end&lt;br /&gt;
    else if &amp;#039;$#objtype&amp;#039; == &amp;#039;menu&amp;#039; then&lt;br /&gt;
        if &amp;#039;$#msgid&amp;#039; == &amp;#039;update&amp;#039; then&lt;br /&gt;
            $#objname /Read // retrieve new&lt;br /&gt;
            $myGraph cursormode both $(word $cursorStyle $cursorStyleList) * $(int $functionBound-1) /Apply&lt;br /&gt;
        end&lt;br /&gt;
    else if &amp;#039;$#objtype&amp;#039; == &amp;#039;value&amp;#039; then&lt;br /&gt;
        if &amp;#039;$#objname&amp;#039; == &amp;#039;$myCursors&amp;#039; then&lt;br /&gt;
            #x1 := format &amp;#039;%.2f&amp;#039; $myCursors[!data,5]&lt;br /&gt;
            #y1 := format &amp;#039;%.2f&amp;#039; $myCursors[!data,6]&lt;br /&gt;
            #x2 := format &amp;#039;%.2f&amp;#039; $myCursors[!data,10]&lt;br /&gt;
            #y2 := format &amp;#039;%.2f&amp;#039; $myCursors[!data,11]&lt;br /&gt;
            $myDialog $staticCtrlId * &amp;#039;x1=$#x1 y1=$#y1 x2=$#x2 y2=$#y2&amp;#039;&lt;br /&gt;
        end  &lt;br /&gt;
    end&lt;br /&gt;
exit 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Color Settings Script Example===&lt;br /&gt;
&lt;br /&gt;
The following script demonstrates how to set a graphs colors, fonts etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[macro gui_colors_example #standalone=1]&lt;br /&gt;
    //&lt;br /&gt;
    // create display, graph and dialog&lt;br /&gt;
    // and configure, display cursors&lt;br /&gt;
    //&lt;br /&gt;
    if &amp;#039;$#standalone&amp;#039; == 1 then&lt;br /&gt;
        if &amp;#039;$(load macrocode $scriptdirectory\gui_basic_example.sts)&amp;#039; &amp;gt; 0 em $rc ; $#mac - $emsg&lt;br /&gt;
        gui_basic_example 0&lt;br /&gt;
        if &amp;#039;$(load macrocode $scriptdirectory\gui_cursors_example.sts)&amp;#039; &amp;gt; 0 em $rc ; $#mac - $emsg&lt;br /&gt;
        gui_cursors_example 0&lt;br /&gt;
    end&lt;br /&gt;
    //&lt;br /&gt;
    // configure graph&lt;br /&gt;
    //&lt;br /&gt;
    // the title (top left) of the graph&lt;br /&gt;
    $myGraph title on &amp;#039;arial:13:italic&amp;#039; black &amp;#039;Graph Title&amp;#039;&lt;br /&gt;
    // axis data range, units and title&lt;br /&gt;
    //    this data is used for the labels as well as the cursor&lt;br /&gt;
    //    position data.&lt;br /&gt;
    $myGraph xscale 0 $#nValues-1 &amp;#039;X Unit&amp;#039; &amp;#039;X Title&amp;#039;&lt;br /&gt;
    $myGraph yscale 0 $#nValues-1 &amp;#039;Y Unit&amp;#039; &amp;#039;Y Title&amp;#039;&lt;br /&gt;
    // colors / fonts / labels etc&lt;br /&gt;
    //    specify the background color&lt;br /&gt;
    $myGraph bgcolor hlgray white&lt;br /&gt;
    //    specify which axes labels to display, the font and color to use&lt;br /&gt;
    $myGraph axis below left &amp;#039;courier:10&amp;#039; gray below left &amp;#039;arial:12:bold&amp;#039; black on on&lt;br /&gt;
    //    specify which axes to display and whether to display a grid or not&lt;br /&gt;
    //    and the number of steps between labels (ticks).&lt;br /&gt;
    $myGraph frame below left gray both gray 5 5 -20 -10&lt;br /&gt;
    // plot type and data source    &lt;br /&gt;
    $myGraph y 0 * * 1 red lines solid 3&lt;br /&gt;
    // cursors&lt;br /&gt;
    $myGraph cursormode both cross on 0 off off red yellow /Apply&lt;br /&gt;
    //&lt;br /&gt;
    // set the display position&lt;br /&gt;
    //&lt;br /&gt;
    $myDisplay enabled restored 100 100 800 800&lt;br /&gt;
    //&lt;br /&gt;
    //  process messages until display is close&lt;br /&gt;
    //  by the user&lt;br /&gt;
    //&lt;br /&gt;
    setmsghandler display $myDisplay gui_colors_example_mh&lt;br /&gt;
    AppMode := 1&lt;br /&gt;
    do while &amp;#039;$AppMode&amp;#039; != &amp;#039;0&amp;#039;&lt;br /&gt;
        GetMessage&lt;br /&gt;
    end&lt;br /&gt;
    setmsghandler display $myDisplay&lt;br /&gt;
    //&lt;br /&gt;
    // clean up&lt;br /&gt;
    //&lt;br /&gt;
    delete $myGraph $myDisplay $myDialog $mySpu $myCursors&lt;br /&gt;
exit&lt;br /&gt;
&lt;br /&gt;
[MACRO gui_colors_example_mh #objtype #objname #msgid #msgpar]&lt;br /&gt;
    if &amp;#039;$#objtype&amp;#039; == display || &amp;#039;$#objtype&amp;#039; == shell then&lt;br /&gt;
        if &amp;#039;$#msgid&amp;#039; == Close || &amp;#039;$#msgId&amp;#039; == Exit then&lt;br /&gt;
            AppMode := 0    &lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
exit 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Jw</name></author>
	</entry>
</feed>