<?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: Conditional Bivariate Fit Customization Script Based on Group By Column in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772400#M95266</link>
    <description>&lt;P&gt;You can try to do it interactively in JMP (you will most likely have to hard-code the Rect() values to each scatterplot). I would suggest using JSL with a loop.&lt;/P&gt;</description>
    <pubDate>Wed, 10 Jul 2024 19:06:19 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-07-10T19:06:19Z</dc:date>
    <item>
      <title>Conditional Bivariate Fit Customization Script Based on Group By Column</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772388#M95265</link>
      <description>&lt;P&gt;Hi, I am relatively new to JMP and am using the bivariate plot platform to generate a list of bivariate plots from a dataset. I started using an auto-generated JSL script to add identical axis and legend settings to all plots as seen below:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Bivariate(
	Y( :PeakValue ),
	X( :"Duration (s)"n ),
	By( :Checker Name ),
	SendToReport(
		Dispatch(
			{},
			"Duration (s)",
			ScaleBox,
			{Scale( "Log" ), Format( "Engineering SI", 9 ), Min( 0.0000000001 ),
			Max( 0.001 ), Inc( 1 ), Minor Ticks( 1 ),
			Label Row(
				{Show Major Grid( 1 ), Show Minor Grid( 1 ), Show Minor Labels( 0 )}
			)}
		),
		Dispatch( {}, "PeakValue", ScaleBox, {Label Row( Show Major Grid( 1 ) )} ),
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Marker Drawing Mode( "Normal" ),
			Row Legend(
				Corner,
				Color( 1 ),
				Color Theme( "JMP Default"(1) ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	)
);&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see above, I am grouping the dataset by the column :Checker Name. However, I wanted to extend this script by also adding transparent Rect() graphics objects to create acceptable ranges to each of the scatterplots. However, the dimensions and location of these Rect() objects will vary depending on which bivariate plot it is being plotted in. In short, I need to create a key of :Checker Name to Rect sizing variables that will be correctly applied depending on the bivariate plot in the set. Is this something easy/plausible to incorporate in the pre-generated script I have above?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 18:59:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772388#M95265</guid>
      <dc:creator>jsillman2000</dc:creator>
      <dc:date>2024-07-10T18:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Bivariate Fit Customization Script Based on Group By Column</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772400#M95266</link>
      <description>&lt;P&gt;You can try to do it interactively in JMP (you will most likely have to hard-code the Rect() values to each scatterplot). I would suggest using JSL with a loop.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 19:06:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772400#M95266</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-10T19:06:19Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Bivariate Fit Customization Script Based on Group By Column</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772412#M95268</link>
      <description>&lt;P&gt;How would you recommend I split up the Bivariate function with By( :Checker Name ) into a loop of Bivariates with unique Checker Names?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Jacob&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 19:12:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772412#M95268</guid>
      <dc:creator>jsillman2000</dc:creator>
      <dc:date>2024-07-10T19:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Bivariate Fit Customization Script Based on Group By Column</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772415#M95269</link>
      <description>&lt;P&gt;Save the list of references to a variable: biv = Bivariate( ... ). You can iterate over the list. You can either query the outline boxes t determine the By variable level, or use Summarize() function to get a list of the groups. It will be in the same order.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 19:15:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772415#M95269</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-07-10T19:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Bivariate Fit Customization Script Based on Group By Column</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772426#M95274</link>
      <description>&lt;P&gt;I'm considering using an associative array to assign a rect object to each possible key in the Checker Name column. Can you provide an example of iterating over a list of outline boxes and adding a rect() object to each one? I am also unfamiliar with the Summarize function.&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jul 2024 20:57:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772426#M95274</guid>
      <dc:creator>jsillman2000</dc:creator>
      <dc:date>2024-07-10T20:57:38Z</dc:date>
    </item>
    <item>
      <title>Re: Conditional Bivariate Fit Customization Script Based on Group By Column</title>
      <link>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772451#M95277</link>
      <description>&lt;P&gt;I assume you are using JMP18. When you use By you get a list of platforms back and you can then loop over that. Then it is just about figuring out how to get the title and so on (or you can use Summarize and in that case I would build the reference list in a bit different way). If it is difficult to figure out the looping, you can first just create single bivariate platform and get it working, then expand to loops&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

aa_rect = Associative Array();
aa_rect["M"] = Expr(Rect(80, 60, 120, 55));
aa_rect["F"] = Expr(Rect(90, 65, 140, 55));

bivs = dt &amp;lt;&amp;lt; Bivariate(Y(:height), X(:weight), By(:sex));

For Each({cur_biv}, bivs,
	ob = Report(cur_biv)[OutlineBox(1)];
	obtitle = ob &amp;lt;&amp;lt; get title;
	show(obtitle);
	category = Word(-1, obtitle, "=");
	fb = ob[FrameBox(1)];
	
	Eval(EvalExpr(
		fb &amp;lt;&amp;lt; Add Graphics Script(
			Pen Color("Blue");
			Pen Size(2);
			Expr(aa_rect[category]);
		)
	));
);

&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-1720670698367.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66064i6BF19F0F81DAF306/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1720670698367.png" alt="jthi_0-1720670698367.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jul 2024 04:05:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Conditional-Bivariate-Fit-Customization-Script-Based-on-Group-By/m-p/772451#M95277</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-11T04:05:08Z</dc:date>
    </item>
  </channel>
</rss>

