<?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 Re: How to update axis limits via Global Box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38177#M22344</link>
    <description>&lt;P&gt;I changed the format a bit, just because I wasn;'t sure what everything was doing. &amp;nbsp;However, below is an example of how I typically handle the item that you are questioning. &amp;nbsp;My bigger question, is isn;'t it actually simpler to just drag and move the axis setting simpler for your users, than actually typing in the min and max values?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

//DataPath = "C:\Program Files (x86)\SAS\JMP\11\Samples\Data\Variability Data\Wafer.jmp";
myTable = Open( "$SAMPLE_DATA\Variability Data\Wafer.jmp" );

Param = "Y";
Lim1 = 40;
Lim2 = 160;

FrameSize_X = 775;
FrameSize_Y = 200;

MyWindow = New Window( "Window Controls",
	gr = MyTable &amp;lt;&amp;lt; Variability Chart(
		Y( :Name( "Y" ) ),
		X( :Operator, :Wafer ),
		Max Iter( 100 ),
		Std Dev Chart( 1 ),
		Show Range Bars( 0 ),
		Show Grand Median( 0 ),
		Std Dev Chart( 0 ),
		Points Jittered( 1 ),
		Show Box Plots( 1 ),
		Automatic Recalc( 1 ),
		SendToReport(
			Dispatch(
				{"Variability Chart for Y"},
				"2",
				ScaleBox,
				{Min( Lim1 ), Max( Lim2 ), Inc( Abs( Lim2 - Lim1 ) / 10 ), Minor Ticks( 0 ),
				Show Major Grid( 1 ), Show Minor Grid( 1 ), Inside Ticks( 1 )}
			),
			Dispatch( {"Variability Chart for Y"}, "Y", TextEditBox, {Set Text( Param )} ),
			Dispatch(
				{"Variability Chart for Y"},
				"Variability Chart",
				FrameBox,
				{Frame Size( FrameSize_X, FrameSize_Y ), ,
				Row Legend(
					Name( "Operator" ),
					Color( 1 ),
					Color Theme( "JMP Default" ),
					Marker( 0 ),
					Marker Theme( "" ),
					Continuous Scale( 0 ),
					Reverse Scale( 0 ),
					Excluded Rows( 0 )
				)}
			),
			Dispatch(
				{"Variability Chart for Y"},
				"Varability Std Chart",
				FrameBox,
				{Frame Size( FrameSize_X, FrameSize_Y )}
			)	
		
		)
			
	),
	Panel Box( "1/ Start...", 

		
		g3 = V List Box(
			H List Box(
				Text Box( "Lim 1" ),
				n1 = Number Edit Box(
					Lim1,
					5,
					&amp;lt;&amp;lt;SetFunction(
						Function( {this},
							Report( gr )[AxisBox( 1 )] &amp;lt;&amp;lt; Min( n1 &amp;lt;&amp;lt; get )
						)
					)
				)
			),
			H List Box( Text Box( "Lim 2" ), n2 = Number Edit Box( Lim2,5,
			&amp;lt;&amp;lt;SetFunction(
						Function( {this},
							Report( gr )[AxisBox( 1 )] &amp;lt;&amp;lt; Max( n2 &amp;lt;&amp;lt; get )
						)
					)
			 ) ), 
				
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 14 Apr 2017 21:27:28 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-04-14T21:27:28Z</dc:date>
    <item>
      <title>How to update axis limits via Global Box</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38171#M22339</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I want to control the limites of the Y-axis of a graph via Global boxes (to allow the user to quickly change the limites without double-clicking on the axis properties...).&lt;/P&gt;
&lt;P&gt;In the script attached, I create a window and a graph. Then I add 2 Global Boxes (Lim1 and Lim2) that I initialyze.&lt;/P&gt;
&lt;P&gt;Once the graph is generated, I modify the values of Lim1 and Lim2 but the graph axis is not updated accordingly...I do not see what I am doing wrong.&lt;/P&gt;
&lt;P&gt;Can someone help ?&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 20:03:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38171#M22339</guid>
      <dc:creator>samir</dc:creator>
      <dc:date>2017-04-14T20:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to update axis limits via Global Box</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38176#M22343</link>
      <description>&lt;P&gt;The issue is that the global variable is used to set the axes when the graph is created but the graph doesn't have any relation the global variable after that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There are ways to create the interactivity you're looking for (and I'm sure someone here can provide a prototype) but please don't overlook &lt;A href="http://www.jmp.com/support/help/Alter_Plot_and_Chart_Appearances.shtml" target="_self"&gt;the built-in interactivity&lt;/A&gt; of the axis of every graph in JMP. All you have to do is hover over the axis and the cursor will turn into a hand and you can click and drag to change the axis.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Apr-14-2017 17-22-19.gif" style="width: 640px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/5889i4F565FC68D64A5F6/image-size/large?v=v2&amp;amp;px=999" role="button" title="Apr-14-2017 17-22-19.gif" alt="Apr-14-2017 17-22-19.gif" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'd do your users a great service by teaching them this.&amp;nbsp;That way, they'll have control over every graph they see in JMP, not just the ones you create for them and give them handy text box controls for.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 14 Apr 2017 21:25:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38176#M22343</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2017-04-14T21:25:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to update axis limits via Global Box</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38177#M22344</link>
      <description>&lt;P&gt;I changed the format a bit, just because I wasn;'t sure what everything was doing. &amp;nbsp;However, below is an example of how I typically handle the item that you are questioning. &amp;nbsp;My bigger question, is isn;'t it actually simpler to just drag and move the axis setting simpler for your users, than actually typing in the min and max values?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

//DataPath = "C:\Program Files (x86)\SAS\JMP\11\Samples\Data\Variability Data\Wafer.jmp";
myTable = Open( "$SAMPLE_DATA\Variability Data\Wafer.jmp" );

Param = "Y";
Lim1 = 40;
Lim2 = 160;

FrameSize_X = 775;
FrameSize_Y = 200;

MyWindow = New Window( "Window Controls",
	gr = MyTable &amp;lt;&amp;lt; Variability Chart(
		Y( :Name( "Y" ) ),
		X( :Operator, :Wafer ),
		Max Iter( 100 ),
		Std Dev Chart( 1 ),
		Show Range Bars( 0 ),
		Show Grand Median( 0 ),
		Std Dev Chart( 0 ),
		Points Jittered( 1 ),
		Show Box Plots( 1 ),
		Automatic Recalc( 1 ),
		SendToReport(
			Dispatch(
				{"Variability Chart for Y"},
				"2",
				ScaleBox,
				{Min( Lim1 ), Max( Lim2 ), Inc( Abs( Lim2 - Lim1 ) / 10 ), Minor Ticks( 0 ),
				Show Major Grid( 1 ), Show Minor Grid( 1 ), Inside Ticks( 1 )}
			),
			Dispatch( {"Variability Chart for Y"}, "Y", TextEditBox, {Set Text( Param )} ),
			Dispatch(
				{"Variability Chart for Y"},
				"Variability Chart",
				FrameBox,
				{Frame Size( FrameSize_X, FrameSize_Y ), ,
				Row Legend(
					Name( "Operator" ),
					Color( 1 ),
					Color Theme( "JMP Default" ),
					Marker( 0 ),
					Marker Theme( "" ),
					Continuous Scale( 0 ),
					Reverse Scale( 0 ),
					Excluded Rows( 0 )
				)}
			),
			Dispatch(
				{"Variability Chart for Y"},
				"Varability Std Chart",
				FrameBox,
				{Frame Size( FrameSize_X, FrameSize_Y )}
			)	
		
		)
			
	),
	Panel Box( "1/ Start...", 

		
		g3 = V List Box(
			H List Box(
				Text Box( "Lim 1" ),
				n1 = Number Edit Box(
					Lim1,
					5,
					&amp;lt;&amp;lt;SetFunction(
						Function( {this},
							Report( gr )[AxisBox( 1 )] &amp;lt;&amp;lt; Min( n1 &amp;lt;&amp;lt; get )
						)
					)
				)
			),
			H List Box( Text Box( "Lim 2" ), n2 = Number Edit Box( Lim2,5,
			&amp;lt;&amp;lt;SetFunction(
						Function( {this},
							Report( gr )[AxisBox( 1 )] &amp;lt;&amp;lt; Max( n2 &amp;lt;&amp;lt; get )
						)
					)
			 ) ), 
				
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 14 Apr 2017 21:27:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38177#M22344</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-04-14T21:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to update axis limits via Global Box</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38182#M22349</link>
      <description>&lt;P&gt;Nelson, Jeff,&lt;/P&gt;
&lt;P&gt;I understand your reasoning: using the interactive platform (drag, move,...) of the axes is very useful indeed...However for a couple of reasons, it is not helpful for me:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Most of the graphs I will generate will contain outliers that will have a value much&amp;nbsp;higher than the rest of the population. In this case, the intreactive solution is very time consuming and painfull...&lt;/LI&gt;
&lt;LI&gt;I intend to generate like 30 graphs in a single window: you can imagine that changing interactively the 30 graphs is not an option. having a box or couple of boxes to set all values is more time-efficient.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Anyway, I see the solution of Nelson is working fine. It looks a big complexe: I have to look in details what is done.&lt;/P&gt;
&lt;P&gt;thanks a lot.&lt;/P&gt;</description>
      <pubDate>Sat, 15 Apr 2017 10:27:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/38182#M22349</guid>
      <dc:creator>samir</dc:creator>
      <dc:date>2017-04-15T10:27:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to update axis limits via Global Box</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/396054#M64670</link>
      <description>&lt;P&gt;I came across your question trying to do something very similar (set axis limits by data on many graphs so that outliers aren't missed). I solved it by setting the axis limits to an expression to evaluate (i.e equal to the minimum value - either the LSL or the lowest data point, opposite for max). See below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Get min/max for Graph 1
dt = Current Data Table();
G1 = dt &amp;lt;&amp;lt; Get Rows Where (:Column 1 == "Group1");
G1_Min = Eval( Min((LSL[1]*0.95), Min(:Column 2[G1])));
G1_Max = Eval( Max((USL[1]*1.05), Max(:Column 2[G1])));
dt &amp;lt;&amp;lt; clear select;

// Get min/max for Graph 2 etc. repeat for each graph
dt = Current Data Table();
G2 = dt &amp;lt;&amp;lt; Get Rows Where (:Column 1 == "Group2");
G2_Min = Eval( Min((LSL[2]*0.95), Min(:Column 2[G2])));
G2_Max = Eval( Max((USL[2]*1.05), Max(:Column 2[G2])));
dt &amp;lt;&amp;lt; clear select;

// Assign axis limits and specification lines within the graph parameters (for Graph 1 - repeat for each)
Dispatch ({Min(G1_Min), Max(G1_Max), Inc( Eval((G1_Max - G1_Min) / 7))),
Add Ref Line( LSL[1], "Solid", "Medium Dark Blue", "LSL", 1 ),
Add Ref Line( USL[1], "Solid", "Medium Dark Blue", "USL", 1 )}&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;* Note: I know your problem is resolved as its been 4-years, but it may help others with similar problems.&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jun 2021 15:33:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-update-axis-limits-via-Global-Box/m-p/396054#M64670</guid>
      <dc:creator>amurphy</dc:creator>
      <dc:date>2021-06-25T15:33:12Z</dc:date>
    </item>
  </channel>
</rss>

