<?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: Creating Fit Group Bivariate Charts with For Loop in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445550#M69340</link>
    <description>Thanks for the suggestion as always.&lt;BR /&gt;&lt;BR /&gt;Do you have a suggestion for just getting charts for certain pairs. Such as NPN1 vs PNP1 and NPN2 vs PNP2?</description>
    <pubDate>Wed, 15 Dec 2021 20:27:18 GMT</pubDate>
    <dc:creator>Heart_To_Tell</dc:creator>
    <dc:date>2021-12-15T20:27:18Z</dc:date>
    <item>
      <title>Creating Fit Group Bivariate Charts with For Loop</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445447#M69332</link>
      <description>&lt;P&gt;Instead of using hardcoded column names as input, I'd like a simple for loop to create the same charts as without the for loop.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open("C:\Program Files\SAS\JMP\15\Samples\Data\semiconductor capability.jmp");
Y_parameters = {"NPN1", "NPN2", "NPN3"};
X_parameters = {"PNP1", "PNP2", "PNP3"};

Fit Group(
	//For i:
		//For j:
			Bivariate( Y( As Column(dt, Y_parameters[i]) ), X( As Column(dt, X_parameters[j])) ),
		//end For j:
	//end For i
	
	//Want to replace the hard coded Y and X parameters with above for loop
	Bivariate( Y( :NPN1 ), X( :PNP1 ) ),
	Bivariate( Y( :NPN1 ), X( :PNP2 ) ),
	Bivariate( Y( :NPN1 ), X( :PNP3 ) ),
	Bivariate( Y( :NPN2 ), X( :PNP1 ) ),
	Bivariate( Y( :NPN2 ), X( :PNP2 ) ),
	Bivariate( Y( :NPN2 ), X( :PNP3 ) ),
	Bivariate( Y( :NPN3 ), X( :PNP1 ) ),
	Bivariate( Y( :NPN3 ), X( :PNP2 ) ),
	Bivariate( Y( :NPN3 ), X( :PNP3 ) ),
	&amp;lt;&amp;lt;{Arrange in Rows( 3 )}
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:07:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445447#M69332</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2023-06-09T18:07:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Fit Group Bivariate Charts with For Loop</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445496#M69335</link>
      <description>&lt;P&gt;If you want to get all combinations, I think you can just use&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
Y_parameters = {"NPN1", "NPN2", "NPN3"};
X_parameters = {"PNP1", "PNP2", "PNP3"};

Fit Group(
	Bivariate( Y(Eval(Y_parameters)), X(Eval(x_parameters))),
	&amp;lt;&amp;lt;{Arrange in Rows( 3 )}
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1639597764201.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/38453i70350EB639754C06/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1639597764201.png" alt="jthi_0-1639597764201.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 19:49:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445496#M69335</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-12-15T19:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Fit Group Bivariate Charts with For Loop</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445550#M69340</link>
      <description>Thanks for the suggestion as always.&lt;BR /&gt;&lt;BR /&gt;Do you have a suggestion for just getting charts for certain pairs. Such as NPN1 vs PNP1 and NPN2 vs PNP2?</description>
      <pubDate>Wed, 15 Dec 2021 20:27:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445550#M69340</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2021-12-15T20:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Fit Group Bivariate Charts with For Loop</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445612#M69343</link>
      <description>&lt;P&gt;I would most likely do it with two lists (or associative array) and then looping. I think I wouldn't even use Fit Group unless I really had to and just create them with display boxes.&lt;/P&gt;&lt;P&gt;You can also try to use expressions, but this gets messy and complicated quickly (and at least this solution isn't as robust as I would like to use, I just tried different things and got it working):&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);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");
Y_parameters = {"NPN1", "NPN2", "NPN3"};
X_parameters = {"PNP1", "PNP2", "PNP3"};

fg_expr = Expr(
	dt &amp;lt;&amp;lt; Fit Group(test, &amp;lt;&amp;lt;{Arrange in Rows(3)})
);

biv_expr = Expr({});

For(i = 1, i &amp;lt;= N Items(Y_parameters),i++,
	next_biv = Eval Expr(Bivariate(Y(Column(Expr(Y_parameters[i]))), X(Column(Expr(X_parameters[i])))));
	Insert Into(biv_expr, Name Expr(next_biv));
);

Substitute Into(fg_expr, Expr(test), Expr(EvalList(NameExpr(biv_expr))));
Show(Name Expr(fg_expr));
fg_expr;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Dec 2021 22:10:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445612#M69343</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-12-15T22:10:28Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Fit Group Bivariate Charts with For Loop</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445633#M69345</link>
      <description>Thank you Jarmo! Works as expected!</description>
      <pubDate>Thu, 16 Dec 2021 02:38:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/445633#M69345</guid>
      <dc:creator>Heart_To_Tell</dc:creator>
      <dc:date>2021-12-16T02:38:26Z</dc:date>
    </item>
    <item>
      <title>Re: Creating Fit Group Bivariate Charts with For Loop</title>
      <link>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/877993#M104085</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp; &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5579"&gt;@Wendy_Murphrey&lt;/a&gt;&amp;nbsp;I was following this solution on this. Not exactly sure how to use the eval expr. I am trying to loop parameter column with semiconductor wafers. For some reason associated array wasn't working for me ( I am using JMP pro 18), so chose a list approach. Appreciate your help on this! Thank you&lt;/P&gt;
&lt;DIV&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;startcol = 37;
endCol = N Cols(dt);
For(t = startCol, t &amp;lt;= endCol, t++,
	Insert Into(targetList, AllColList[t])
);
Summarize(dt, newlist = by(:waferno));

 

 

 
fg_expr = Expr(
	dt &amp;lt;&amp;lt; Fit Group(test, &amp;lt;&amp;lt;{Arrange in Rows(1)}, Order by Goodness of Fit)
);
 
ow_expr = Expr({});
 
currentlabel = targetList[1];
 
currentwafer = newlist[1];
 
 
For(ilabel = 1, ilabel &amp;lt;= 2, ilabel++,
	nextlabel = targetList[ilabel + 1];
	Show(nextlabel);
	For(iwfr = 1, iwfr &amp;lt;= 2, iwfr++,
		nextwafer = newlist[iwfr + 1];
		Show(nextwafer);
//nw2=vl&amp;lt;&amp;lt;Append(     eval expr(
		fg = dt &amp;lt;&amp;lt; Oneway(
			Y(Column(dt, currentlabel)),
			X(:Split),
			Plot Actual by Quantile(1),
			Line of Fit(0),
			Box Plots(1),
			Mean Diamonds(1),
			X Axis Proportional(0),
			Grand Mean(0),
			Histograms(1),
			All Pairs(1),
			Where(dt:waferno == currentwafer),
			SendToReport(
				Dispatch({}, "2", ScaleBox, {Min(0), Max(2), Inc(1), Minor Ticks(0)}),
				Dispatch({}, "Oneway Plot", FrameBox,
					{Marker Size(0), Marker Drawing Mode("Normal"),
					DispatchSeg(Box Plot Seg(1), {Confidence Diamond(0), Line Color("Red")}),
					DispatchSeg(Box Plot Seg(2), {Confidence Diamond(0), Line Color("Red")})}
				),
				Dispatch({}, "Oneway Means Compare", FrameBox,
					{Marker Size(0), Marker Drawing Mode("Normal")}
				),
				Dispatch({}, "Oneway QuantilePlot", FrameBox,
					{Marker Size(0), Marker Drawing Mode("Normal")}
				),
				Dispatch({}, "Oneway Report", FrameBox,
					{Marker Size(0), Marker Drawing Mode("Normal")}
				),
				Dispatch({}, "Oneway Report", FrameBox(2),
					{Marker Size(0), Marker Drawing Mode("Normal")}
				),

			); 
 
		);
		Report(fg)[Outline Box(1)] &amp;lt;&amp;lt; set title(
			"label_" || Char(currentlabel) || "_waferno_" || Char(currentwafer)
		);
		Report(fg)[Outline Box(1)] &amp;lt;&amp;lt; Set Font Size(15);
 
 
	);
	Insert Into(ow_expr, Name Expr(fg));
	currentwafer = nextwafer;
 
);
currentlabel = nextlabel;
Substitute Into(fg_expr, Expr(test), Expr(Eval List(Name Expr(ow_expr))));
Show(Name Expr(fg_expr));
fg_expr;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Jun 2025 19:42:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Creating-Fit-Group-Bivariate-Charts-with-For-Loop/m-p/877993#M104085</guid>
      <dc:creator>vishwasanj</dc:creator>
      <dc:date>2025-06-03T19:42:52Z</dc:date>
    </item>
  </channel>
</rss>

