<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Variables to use as axis max/min in data table graph builder script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Variables-to-use-as-axis-max-min-in-data-table-graph-builder/m-p/229922#M45628</link>
    <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following lines in my script I am saving to the data table and then running to make a graph builder graph. When I run the graph from the script it uses the variables as the max and min for graph builder but if I run the script saved to the data table (say I give the table to someone else) it uses default max and min instead. Any recommendations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;min_val = col min(:col1);
max_val = col max(:col1);

// rest of graph builder function not included

Dispatch(
			{},
			"Y Axis Name",
			ScaleBox,
			{Min( min_val ), Max( max val )}
		)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried several things but creating min_val and max_val as table variables and passing those to the dispatch felt like the most promising but no luck - defaults min and max are instead used.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 21 Oct 2019 20:34:42 GMT</pubDate>
    <dc:creator>bittnere</dc:creator>
    <dc:date>2019-10-21T20:34:42Z</dc:date>
    <item>
      <title>Variables to use as axis max/min in data table graph builder script</title>
      <link>https://community.jmp.com/t5/Discussions/Variables-to-use-as-axis-max-min-in-data-table-graph-builder/m-p/229922#M45628</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following lines in my script I am saving to the data table and then running to make a graph builder graph. When I run the graph from the script it uses the variables as the max and min for graph builder but if I run the script saved to the data table (say I give the table to someone else) it uses default max and min instead. Any recommendations?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;min_val = col min(:col1);
max_val = col max(:col1);

// rest of graph builder function not included

Dispatch(
			{},
			"Y Axis Name",
			ScaleBox,
			{Min( min_val ), Max( max val )}
		)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've tried several things but creating min_val and max_val as table variables and passing those to the dispatch felt like the most promising but no luck - defaults min and max are instead used.&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 20:34:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Variables-to-use-as-axis-max-min-in-data-table-graph-builder/m-p/229922#M45628</guid>
      <dc:creator>bittnere</dc:creator>
      <dc:date>2019-10-21T20:34:42Z</dc:date>
    </item>
    <item>
      <title>Re: Variables to use as axis max/min in data table graph builder script</title>
      <link>https://community.jmp.com/t5/Discussions/Variables-to-use-as-axis-max-min-in-data-table-graph-builder/m-p/230014#M45643</link>
      <description>&lt;P&gt;The Send to Report() and Dispatch() functions are intended to be used by JMP to save user customizations in a platform. The scripter should instead send messages directly to the object.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );

// get example
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

// pre-determine new scale
y min = 80;
y max = 100;

// launch Graph Builder
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 534, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :height ), Y( :weight ) ),
	Elements( Points( X, Y, Legend( 3 ) ) )
);

// get reference to report layer with display boxes
gb rep = gb &amp;lt;&amp;lt; Report;

// send cascade of messages to y axis
Wait( 3 );
gb rep[AxisBox(2)]
	&amp;lt;&amp;lt; Min( y min )
	&amp;lt;&amp;lt; Max( y max );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Oct 2019 13:31:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Variables-to-use-as-axis-max-min-in-data-table-graph-builder/m-p/230014#M45643</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2019-10-22T13:31:09Z</dc:date>
    </item>
  </channel>
</rss>

