<?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 set different scale when I use &amp;quot;by&amp;quot;? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767544#M94771</link>
    <description>&lt;P&gt;With Graph Builder you might want to use Page instead of By. You have to set all axis separately or use scripting solutions which can get a bit complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With Page&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(525, 2954),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Page(:age)),
	Elements(Points(X, Y, Legend(12)), Smoother(X, Y, Legend(13))),
	SendToReport(
		Dispatch({}, "height", ScaleBox(2), {Min(49.55686), Max(71.1300045339471), Inc(5), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(3), {Min(39.2571438997966), Max(67.3579268825169), Inc(5), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(4), {Min(59.60392), Max(70.2079010526316), Inc(2), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(5), {Min(60.2030935251799), Max(67.27), Inc(1), Minor Ticks(0)}),
		Dispatch({}, "height", ScaleBox(6), {Min(58.60392), Max(69.3254618181818), Inc(2), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(7), {Min(60.1377273502176), Max(70.192348647039), Inc(2), Minor Ticks(1)})
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With By&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	SendToByGroup({:age == 12}),
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height)),
	Elements(Points(X, Y, Legend(1)), Smoother(X, Y, Legend(2))),
	By(:age),
	SendToByGroup({:age == 12}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(46.2708484375), Max(64.6984984375), Inc(5), Minor Ticks(1)}))),
	SendToByGroup({:age == 13}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(54), Max(66.3534322916667), Inc(2), Minor Ticks(0)}))),
	SendToByGroup({:age == 14}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(58.1802560677083), Max(70.9932314583333), Inc(2), Minor Ticks(1)}))),
	SendToByGroup({:age == 15}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(61), Max(66.5205305091258), Inc(1), Minor Ticks(0)}))),
	SendToByGroup({:age == 16}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(57.1194704166667), Max(68.432), Inc(2), Minor Ticks(1)}))),
	SendToByGroup({:age == 17}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(59.0567933224374), Max(69.0987213244912), Inc(2), Minor Ticks(1)})))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 21 Jun 2024 05:31:45 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-06-21T05:31:45Z</dc:date>
    <item>
      <title>How to set different scale when I use "by"?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767530#M94770</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I use "by" function to draw plots one-time.&lt;/P&gt;&lt;P&gt;How could I use script to set different scale?&lt;/P&gt;&lt;P&gt;I tried to use "if" but it didn't work.&lt;/P&gt;&lt;P&gt;Here is my script:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;d_graph=dt3 &amp;lt;&amp;lt; Graph Builder(
	Size( 1200, 300 ),
	Show Control Panel( 0 ),
	Variables(
		X( :Lot ),
		X( :ReadPoint, Position( 1 ) ),
		Y( :drift% ),
		Group X( :Rel_Test ),
		Color( :Lot )
	),
	Elements( Box Plot( X( 1 ), X( 2 ), Y, Legend( 1 ) ) ),
	By( :Label ),
	SendToReport(
			If(:Label == "IGSS" | :Label == "IGSSR" | :Label == "IDSS",
		(Dispatch(
			{},
			"drift%",
			ScaleBox,
			{Min( 0 ), Max( 20 ), Inc( 5 ), Minor Ticks( 1 ),
			Add Ref Line( 10, "Solid", "Medium Dark Red", "1000%", 1 ),
			Add Ref Line( 5, "Dotted", "Medium Dark Red", "500%", 1 )})),
		(Dispatch(
			{},
			"drift%",
			ScaleBox,
			{Min( -0.25 ), Max( 0.25 ), Inc( 0.05 ), Minor Ticks( 1 ),
			Add Ref Line( 1.2, "Solid", "Medium Dark Red", "20%", 1 ),
			Add Ref Line( 0.8, "Solid", "Medium Dark Red", "-20%", 1 )})))
	  )
   );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jun 2024 02:26:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767530#M94770</guid>
      <dc:creator>LT</dc:creator>
      <dc:date>2024-06-21T02:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to set different scale when I use "by"?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767544#M94771</link>
      <description>&lt;P&gt;With Graph Builder you might want to use Page instead of By. You have to set all axis separately or use scripting solutions which can get a bit complicated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With Page&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size(525, 2954),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Page(:age)),
	Elements(Points(X, Y, Legend(12)), Smoother(X, Y, Legend(13))),
	SendToReport(
		Dispatch({}, "height", ScaleBox(2), {Min(49.55686), Max(71.1300045339471), Inc(5), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(3), {Min(39.2571438997966), Max(67.3579268825169), Inc(5), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(4), {Min(59.60392), Max(70.2079010526316), Inc(2), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(5), {Min(60.2030935251799), Max(67.27), Inc(1), Minor Ticks(0)}),
		Dispatch({}, "height", ScaleBox(6), {Min(58.60392), Max(69.3254618181818), Inc(2), Minor Ticks(1)}),
		Dispatch({}, "height", ScaleBox(7), {Min(60.1377273502176), Max(70.192348647039), Inc(2), Minor Ticks(1)})
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;With By&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	SendToByGroup({:age == 12}),
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height)),
	Elements(Points(X, Y, Legend(1)), Smoother(X, Y, Legend(2))),
	By(:age),
	SendToByGroup({:age == 12}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(46.2708484375), Max(64.6984984375), Inc(5), Minor Ticks(1)}))),
	SendToByGroup({:age == 13}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(54), Max(66.3534322916667), Inc(2), Minor Ticks(0)}))),
	SendToByGroup({:age == 14}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(58.1802560677083), Max(70.9932314583333), Inc(2), Minor Ticks(1)}))),
	SendToByGroup({:age == 15}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(61), Max(66.5205305091258), Inc(1), Minor Ticks(0)}))),
	SendToByGroup({:age == 16}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(57.1194704166667), Max(68.432), Inc(2), Minor Ticks(1)}))),
	SendToByGroup({:age == 17}, SendToReport(Dispatch({}, "height", ScaleBox, {Min(59.0567933224374), Max(69.0987213244912), Inc(2), Minor Ticks(1)})))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jun 2024 05:31:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767544#M94771</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-21T05:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to set different scale when I use "by"?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767557#M94772</link>
      <description>&lt;P&gt;Here is one scripting solution when using By. Depending where you get the min/max and ref line values, I would most likely move those outside of the For Each loop.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = Open("$SAMPLE_DATA/Big Class.jmp");

gbs = dt &amp;lt;&amp;lt; Graph Builder(
	SendToByGroup({:age == 12}),
	Size(525, 454),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height)),
	Elements(Points(X, Y, Legend(1)), Smoother(X, Y, Legend(2))),
	By(:age)
);

For Each({gb}, gbs,
	rep = Report(gb);
	yaxis = rep[AxisBox(2)];
	gbtitle = rep[Outline Box(1)] &amp;lt;&amp;lt; Get title;
	category = Word(-1, gbtitle, "=");
	If(Contains({"12", "14", "15", "16"}, category),
		minval = 50;
		maxval = 70;
		ref1 = 55;
		ref2 = 65;
		ref1title = "500%";
		ref2title = "1000%";
	, 	Contains({"13"}, category),
		minval = 0;
		maxval = 100;
		ref1 = 5;
		ref2 = 95;
		ref1title = "-20%";
		ref2title = "20%";
	);
	yaxis &amp;lt;&amp;lt; Min(minval) &amp;lt;&amp;lt; Max(maxval);
	yaxis &amp;lt;&amp;lt; Add Ref Line(ref1, "Solid", "Medium Dark Red", ref1title, 1);
	yaxis &amp;lt;&amp;lt; Add Ref Line(ref2, "Solid", "Medium Dark Red", ref2title, 1);	
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 21 Jun 2024 06:06:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767557#M94772</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-06-21T06:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to set different scale when I use "by"?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767628#M94783</link>
      <description>&lt;P&gt;You might be able to adapt&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;'s approach using XPath(). Send this message to Graph Builder like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;xAxis = d_graph &amp;lt;&amp;lt; XPath( "//AxisBox" );
xAxis[2::N Items(xAxis)::2] &amp;lt;&amp;lt; Min( min ) &amp;lt;&amp;lt; Max( max ) ...;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You should get a list of references to all the Axis display boxes. You want to address the X axes, the even-numbered items in the list. You can use the Index function to subscript the list and send the Axis messages to the list in a cascade. The list will distribute the messages to every item for you.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2024 13:52:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/767628#M94783</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-06-21T13:52:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to set different scale when I use "by"?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/768161#M94840</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp; and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 00:39:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-different-scale-when-I-use-quot-by-quot/m-p/768161#M94840</guid>
      <dc:creator>LT</dc:creator>
      <dc:date>2024-06-25T00:39:08Z</dc:date>
    </item>
  </channel>
</rss>

