<?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: Distribution graph with process capability not working in script in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Distribution-graph-with-process-capability-not-working-in-script/m-p/765344#M94500</link>
    <description>&lt;P&gt;JMP isn't able to add the reference lines correctly (and you don't seem to have value for upperlimit?). Below is an example which can give you some ideas&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Open the data table
colnames = dt &amp;lt;&amp;lt; get column names(numeric, continuous, string);
dists = {};
For Each({colname}, colnames,
	meanValue = Col Mean(Column(dt, colname));
	stdDevValue = Col Std Dev(Column(dt, colname));
	ppkValue = 2;
	uslValue = 3*stddevValue + meanValue;
	dist = Eval(EvalExpr(dt &amp;lt;&amp;lt; Distribution(
		Stack(1),
		Continuous Distribution(
			Column(Eval(colname)),
			Horizontal Layout(1),
			Vertical(0),
			Outlier Box Plot(0),
			Process Capability(
				LSL(.),
				Target(.),
				USL(Expr(uslValue)),
				Show as Graph Reference Lines
			)
		),
		SendToReport(
			Dispatch(
				{colnames[i]},
				"1",
				ScaleBox,
				{Add Ref Line(Expr(uslValue), "Solid", "Blue", "USL", 1)}
			)
		)
	)));
	Insert Into(dists, dist);
	
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 13 Jun 2024 10:06:28 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-06-13T10:06:28Z</dc:date>
    <item>
      <title>Distribution graph with process capability not working in script</title>
      <link>https://community.jmp.com/t5/Discussions/Distribution-graph-with-process-capability-not-working-in-script/m-p/765331#M94496</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I want to use this generated script on numerous columns:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Distribution(
	Stack( 1 ),
	Continuous Distribution(
		Column( :"VDD_ILIMIT"n ),
		Horizontal Layout( 1 ),
		Vertical( 0 ),
		Outlier Box Plot( 0 ),
		Process Capability( LSL( . ), Target( . ), USL( 0.5 ), Show as Graph Reference Lines )
	),
	SendToReport( Dispatch( {"VDD_ILIMIT"}, "1", ScaleBox, {Add Ref Line( 0.5, "Solid", "Blue", "USL", 1 )} ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When using this script, all works well, and I get a distribution graph with process capability plot at the same window.&lt;BR /&gt;When I try to run it on a number of columns, I get only the distribution graphs for each column, without the&amp;nbsp;process capability plot and data.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Open the data table
dt = Current Data Table();
colnames = dt &amp;lt;&amp;lt; get column names( numeric, string );
For( i = 1, i &amp;lt;= N Items( colnames ), i++,
	If( Contains( Column( colnames[i] ) &amp;lt;&amp;lt; Get Name, "ILIMIT" ), 
        // Create a distribution graph for the column
		meanValue = Col Mean( colnames[i] );
		stdDevValue = Col Std Dev( colnames[i] );
		ppkValue = 2;
		uslValue = meanValue + ppkValue * 3 * stdDevValue;
		Distribution(
			Stack( 1 ),
			Continuous Distribution(
				Column( colnames[i] ),
				Horizontal Layout( 1 ),
				Vertical( 0 ),
				Outlier Box Plot( 0 ),
				Process Capability( LSL( . ), Target( . ), USL( uslValue ), Show as Graph Reference Lines )
			),
			SendToReport( Dispatch( {colnames[i]}, "1", ScaleBox, {Add Ref Line( uslValue, "Solid", "Blue", "USL", 1 )} ) )
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What am I doing wrong, and why is it behaving in this way?&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jun 2024 11:19:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Distribution-graph-with-process-capability-not-working-in-script/m-p/765331#M94496</guid>
      <dc:creator>ContentMeerkat5</dc:creator>
      <dc:date>2024-06-13T11:19:51Z</dc:date>
    </item>
    <item>
      <title>Re: Distribution graph with process capability not working in script</title>
      <link>https://community.jmp.com/t5/Discussions/Distribution-graph-with-process-capability-not-working-in-script/m-p/765343#M94499</link>
      <description>&lt;P&gt;Below is a modification to your code that should work for you&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Open the data table
dt = Current Data Table();
colnames = dt &amp;lt;&amp;lt; get column names( numeric, string );
i = 2;
For( i = 1, i &amp;lt;= N Items( colnames ), i++, 
	//If( Contains( Column( colnames[i] ) &amp;lt;&amp;lt; Get Name, "eight" ), 
	If( Contains( colnames[i], "ILIMIT" ), 
        // Create a distribution graph for the column
		//meanValue = Col Mean( colnames[i] );
		meanValue = Col Mean( Column( dt, colnames[i] ) );
		//stdDevValue = Col Std Dev( colnames[i] );
		stdDevValue = Col Std Dev( Column( dt, colnames[i] ) );
		ppkValue = 2; // ???
		
		uslValue = .5; // this value is used below, but was not assigned
		
		Eval(
			Eval Expr(  // JMP does not evaluate items in a list as parsing
				        // therefore it has to be preprocessed
				Distribution(
					Stack( 1 ),
					Continuous Distribution(
						Column( colnames[i] ),
						Horizontal Layout( 1 ),
						Vertical( 0 ),
						Outlier Box Plot( 0 ),
						Process Capability( LSL( . ), Target( . ), USL( Expr( uslValue ) ), Show as Graph Reference Lines )
					),
					SendToReport(
						Dispatch( {Expr( colnames[i] )}, "1", ScaleBox, {Add Ref Line( Expr( uslValue ), "Solid", "Blue", "USL", 1 )} )
					)
				)
			)
		);
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2024 10:05:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Distribution-graph-with-process-capability-not-working-in-script/m-p/765343#M94499</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-06-13T10:05:13Z</dc:date>
    </item>
    <item>
      <title>Re: Distribution graph with process capability not working in script</title>
      <link>https://community.jmp.com/t5/Discussions/Distribution-graph-with-process-capability-not-working-in-script/m-p/765344#M94500</link>
      <description>&lt;P&gt;JMP isn't able to add the reference lines correctly (and you don't seem to have value for upperlimit?). Below is an example which can give you some ideas&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

// Open the data table
colnames = dt &amp;lt;&amp;lt; get column names(numeric, continuous, string);
dists = {};
For Each({colname}, colnames,
	meanValue = Col Mean(Column(dt, colname));
	stdDevValue = Col Std Dev(Column(dt, colname));
	ppkValue = 2;
	uslValue = 3*stddevValue + meanValue;
	dist = Eval(EvalExpr(dt &amp;lt;&amp;lt; Distribution(
		Stack(1),
		Continuous Distribution(
			Column(Eval(colname)),
			Horizontal Layout(1),
			Vertical(0),
			Outlier Box Plot(0),
			Process Capability(
				LSL(.),
				Target(.),
				USL(Expr(uslValue)),
				Show as Graph Reference Lines
			)
		),
		SendToReport(
			Dispatch(
				{colnames[i]},
				"1",
				ScaleBox,
				{Add Ref Line(Expr(uslValue), "Solid", "Blue", "USL", 1)}
			)
		)
	)));
	Insert Into(dists, dist);
	
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Jun 2024 10:06:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Distribution-graph-with-process-capability-not-working-in-script/m-p/765344#M94500</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-13T10:06:28Z</dc:date>
    </item>
  </channel>
</rss>

