<?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: Uniform axis scaling in Control Chart Builder Script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Uniform-axis-scaling-in-Control-Chart-Builder-Script/m-p/848217#M102347</link>
    <description>&lt;P&gt;Thanks for the help!&amp;nbsp; I guess the missing subscript [i] in my CCProperty list variable was the cause of my issues.&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 17:43:32 GMT</pubDate>
    <dc:creator>SW</dc:creator>
    <dc:date>2025-03-17T17:43:32Z</dc:date>
    <item>
      <title>Uniform axis scaling in Control Chart Builder Script</title>
      <link>https://community.jmp.com/t5/Discussions/Uniform-axis-scaling-in-Control-Chart-Builder-Script/m-p/848204#M102343</link>
      <description>&lt;P&gt;I am working on a script to cycle through a list of properties and make a pair of control charts for each.&amp;nbsp; The pair (by "Line") of charts must be displayed side-by-side and have the same Y-axis scaling.&lt;/P&gt;&lt;P&gt;I have a list of properties (a list variable called CCProperty), and a list of axis settings for each property (a matrix variable called CCFormat).&amp;nbsp; Even though I used the same numbers (as CCFormat[i,j]) for min, max, increment, and number of ticks for each graph, the scales do not consistently match.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated. I am using JMP Pro 18.1.1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The full data table with embedded script is attached.&amp;nbsp; Here's a snippet of the code:&lt;/P&gt;&lt;DIV&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For(i=1, i &amp;lt;= N Items(CCProperty), i += 1,  //  Loop through all the properties and make control charts using the graph min and max

Mainbox&amp;lt;&amp;lt;append(hb=H List Box()); //Append the horizontal box with the two graphs to the mainbox


//*********Generate the Control Chart for LINE 1:**************
	hb&amp;lt;&amp;lt;append(Control Chart Builder(
	Size( 650, 600 ),Graph Spacing( 10 ),
	Test Excluded Subgroups( 0 ),Show Limit Labels( 1 ),Show Capability( 0 ),Show Limit Summaries( 0 ),
	
	Variables( Subgroup( :Workorder ), Y(column(CCProperty[i])) ),
	Chart(Position( 1 ),Points( Statistic( "Average" ) ),Limits( Sigma( "Moving Range" ), Spec Limits( 1 ) )	),
	Chart(Position( 2 ),Points( Statistic( "Moving Range on Means" ) ),Limits( Sigma( "Moving Range" ) )	),
	Chart(Position( 3 ),Points( Statistic( "Standard Deviation" ) ),Limits( Sigma( "Standard Deviation" ) )	),
	Show Control Panel( 0 ),
	By( :Line ),

	Where( :Line == "Line 1" ),
	SendToReport(Dispatch(CCProperty, ScaleBox,{Min( CCFormat[i,1] ),Max( CCFormat[i,2] ),Inc( CCFormat[i,3] ),Minor Ticks( CCFormat[i,4] )}	),
			),
	));

	
//*********Generate the Control Chart for LINE 2:**************
	hb&amp;lt;&amp;lt;append(Control Chart Builder(
	Size( 650, 600 ),Graph Spacing( 10 ),
	Test Excluded Subgroups( 0 ),Show Limit Labels( 1 ),Show Capability( 0 ),Show Limit Summaries( 0 ),
	
	Variables( Subgroup( :Workorder ), Y(column(CCProperty[i])) ),
	Chart(Position( 1 ),Points( Statistic( "Average" ) ),Limits( Sigma( "Moving Range" ), Spec Limits( 1 ) )	),
	Chart(Position( 2 ),Points( Statistic( "Moving Range on Means" ) ),Limits( Sigma( "Moving Range" ) )	),
	Chart(Position( 3 ),Points( Statistic( "Standard Deviation" ) ),Limits( Sigma( "Standard Deviation" ) )	),
	Show Control Panel( 0 ),
	By( :Line ),
	Where( :Line == "Line 2" ),
	SendToReport(Dispatch(CCProperty, ScaleBox,{Min( CCFormat[i,1] ),Max( CCFormat[i,2] ),Inc( CCFormat[i,3] ),Minor Ticks( CCFormat[i,4] )}),
			),
		
	));
	
);  //end of For Loop&lt;/CODE&gt;&lt;/PRE&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 17 Mar 2025 16:05:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Uniform-axis-scaling-in-Control-Chart-Builder-Script/m-p/848204#M102343</guid>
      <dc:creator>SW</dc:creator>
      <dc:date>2025-03-17T16:05:23Z</dc:date>
    </item>
    <item>
      <title>Re: Uniform axis scaling in Control Chart Builder Script</title>
      <link>https://community.jmp.com/t5/Discussions/Uniform-axis-scaling-in-Control-Chart-Builder-Script/m-p/848215#M102345</link>
      <description>&lt;P&gt;I did slight changes to your script which might solve the issue in this case. This part I changed the most&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;SendToReport(
	Dispatch({}, CCProperty[i], ScaleBox, {Min(CCFormat[i, 1]), Max(CCFormat[i, 2]), Inc(CCFormat[i, 3]), Minor Ticks(CCFormat[i, 4])}),
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

CCProperty = {"Strength", "Elongation", "Weight", "Thickness"};

CCFormat = [60 66 1 4, 25 45.5 5 4, 3.4 4.0 0.1 4, 8 16 1 4];

outputwin = New Window("Control Charts", Outline Box("Control Charts", Mainbox = V List Box()));

For(i = 1, i &amp;lt;= N Items(CCProperty), i++,
	Mainbox &amp;lt;&amp;lt; append(hb = H List Box());

	hb &amp;lt;&amp;lt; append(
		Control Chart Builder(
			Size(650, 600),
			Graph Spacing(10),
			Test Excluded Subgroups(0),
			Show Limit Labels(1),
			Show Capability(0),
			Show Limit Summaries(0), 
	
			Variables(Subgroup(:Workorder), Y(Column(CCProperty[i]))),
			Chart(Position(1), Points(Statistic("Average")), Limits(Sigma("Moving Range"), Spec Limits(1))),
			Chart(Position(2), Points(Statistic("Moving Range on Means")), Limits(Sigma("Moving Range"))),
			Chart(Position(3), Points(Statistic("Standard Deviation")), Limits(Sigma("Standard Deviation"))),
			Show Control Panel(0),
			By(:Line), 

			Where(:Line == "Line 1"),
			SendToReport(
				Dispatch({}, CCProperty[i], ScaleBox, {Min(CCFormat[i, 1]), Max(CCFormat[i, 2]), Inc(CCFormat[i, 3]), Minor Ticks(CCFormat[i, 4])}),
			)
		)
	);

	hb &amp;lt;&amp;lt; append(
		Control Chart Builder(
			Size(650, 600),
			Graph Spacing(10),
			Test Excluded Subgroups(0),
			Show Limit Labels(1),
			Show Capability(0),
			Show Limit Summaries(0), 
	
			Variables(Subgroup(:Workorder), Y(Column(CCProperty[i]))),
			Chart(Position(1), Points(Statistic("Average")), Limits(Sigma("Moving Range"), Spec Limits(1))),
			Chart(Position(2), Points(Statistic("Moving Range on Means")), Limits(Sigma("Moving Range"))),
			Chart(Position(3), Points(Statistic("Standard Deviation")), Limits(Sigma("Standard Deviation"))),
			Show Control Panel(0),
			By(:Line),
			Where(:Line == "Line 2"),
			SendToReport(
				Dispatch({}, CCProperty[i], ScaleBox, {Min(CCFormat[i, 1]), Max(CCFormat[i, 2]), Inc(CCFormat[i, 3]), Minor Ticks(CCFormat[i, 4])}),
			)
		)
	);
);  //end of For Loop&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI-SPOILER&gt;
&lt;P&gt;Generally I would suggest setting the axis values outside of the graph, but in simple case like this, using sendtoreport inside the graph message should be enough&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 16:20:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Uniform-axis-scaling-in-Control-Chart-Builder-Script/m-p/848215#M102345</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-03-17T16:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: Uniform axis scaling in Control Chart Builder Script</title>
      <link>https://community.jmp.com/t5/Discussions/Uniform-axis-scaling-in-Control-Chart-Builder-Script/m-p/848217#M102347</link>
      <description>&lt;P&gt;Thanks for the help!&amp;nbsp; I guess the missing subscript [i] in my CCProperty list variable was the cause of my issues.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 17:43:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Uniform-axis-scaling-in-Control-Chart-Builder-Script/m-p/848217#M102347</guid>
      <dc:creator>SW</dc:creator>
      <dc:date>2025-03-17T17:43:32Z</dc:date>
    </item>
  </channel>
</rss>

