<?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 How do I add/make reference lines consistent within a control chart w/ Column Switcher? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458078#M70323</link>
    <description>&lt;P&gt;I am attempting to re-create a control chart similar to the one below. I'm Levey-Jennings control charts with column switcher. The x-axis is consistent and it is an alphanumeric lot code. I currently need help adding the vertical blue reference lines for batch IDs. Ideally, these lines would remain as I move about through column switcher.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently on JMP 15.2.0 on Windows 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Feb 2022 13:36:55 GMT</pubDate>
    <dc:creator>BrandonP1092</dc:creator>
    <dc:date>2022-02-03T13:36:55Z</dc:date>
    <item>
      <title>How do I add/make reference lines consistent within a control chart w/ Column Switcher?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458078#M70323</link>
      <description>&lt;P&gt;I am attempting to re-create a control chart similar to the one below. I'm Levey-Jennings control charts with column switcher. The x-axis is consistent and it is an alphanumeric lot code. I currently need help adding the vertical blue reference lines for batch IDs. Ideally, these lines would remain as I move about through column switcher.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm currently on JMP 15.2.0 on Windows 10&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 13:36:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458078#M70323</guid>
      <dc:creator>BrandonP1092</dc:creator>
      <dc:date>2022-02-03T13:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add/make reference lines consistent within a control chart w/ Column Switcher?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458098#M70324</link>
      <description>&lt;P&gt;Here is an example of something similar that you can use.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt=Open("$SAMPLE_DATA/Cities.jmp");
Control Chart Builder(
	Show Two Shewhart Charts( 0 ),
	Variables( Subgroup( :Region ), Y( :"pop- m"n ) ),
	Chart( Points( Statistic( "Average" ) ), Limits( Sigma( "Levey Jennings" ) ) ),
	Column Switcher( :"pop- m"n, {:"pop- m"n, :POP, :Max deg. F Jan, :OZONE, :CO} ),
	SendToReport(
		Dispatch(
			{},
			"Region",
			ScaleBox,
			{Add Ref Line( 1, "Solid", "Blue", "", 1 ),
			Add Ref Line( 2, "Solid", "Blue", "", 1 ),
			Add Ref Line( 3, "Solid", "Blue", "", 1 )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 03 Feb 2022 13:46:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458098#M70324</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2022-02-03T13:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add/make reference lines consistent within a control chart w/ Column Switcher?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458104#M70326</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/36185"&gt;@BrandonP1092&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; In addition to what&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/1450"&gt;@tonya_mauldin&lt;/a&gt;&amp;nbsp;has suggested, you might also consider adding either Spec Limits or Control Limits as meta data to your columns. Right click your column and select Column Info. From the Column Properties pulldown menu, select the one which is appropriate for your needs.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDF1_0-1643896174387.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39690i310D0357E4C48B4A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SDF1_0-1643896174387.png" alt="SDF1_0-1643896174387.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;After you enter the spec/control limits, you can select "Show as Graph Reference Lines", and each time you make a graph, distribution, etc with the data, it will have thin blue line(s) for the USL, LSL, and target (if not missing).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDF1_1-1643896208737.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39691i77CC82DF48313A32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SDF1_1-1643896208737.png" alt="SDF1_1-1643896208737.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you are more advanced and do a lot of scripting, you can automate this process using the Analyze &amp;gt; Quality and Process &amp;gt; Manage Spec Limits platform. It makes your life a lot easier if you have to do this a lot.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SDF1_2-1643896307338.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39692i06C11C1599CD0280/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SDF1_2-1643896307338.png" alt="SDF1_2-1643896307338.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!,&lt;/P&gt;&lt;P&gt;DS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 13:51:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458104#M70326</guid>
      <dc:creator>SDF1</dc:creator>
      <dc:date>2022-02-03T13:51:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add/make reference lines consistent within a control chart w/ Column Switcher?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458151#M70330</link>
      <description>&lt;P&gt;Thank you,&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/1450"&gt;@tonya_mauldin&lt;/a&gt;. I was able to get the script to run without any bugs; however, it moved those reference points to the beginning of the control chart; rather than integrating them throughout. Any thoughts on this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 15:02:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458151#M70330</guid>
      <dc:creator>BrandonP1092</dc:creator>
      <dc:date>2022-02-03T15:02:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add/make reference lines consistent within a control chart w/ Column Switcher?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458155#M70331</link>
      <description>&lt;P&gt;The script you attached adds 5 reference lines.&amp;nbsp; They will be placed at x values of 1, 2, 3, 4, 5. If you want them placed in different locations, you will need to update the script with the appropriate locations.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Please look at the Add Ref Line entry in the OSI to see how the syntax works for reference lines.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tonya_mauldin_0-1643901443616.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/39697i70E3B08493EBDF73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tonya_mauldin_0-1643901443616.png" alt="tonya_mauldin_0-1643901443616.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 15:38:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458155#M70331</guid>
      <dc:creator>tonya_mauldin</dc:creator>
      <dc:date>2022-02-03T15:38:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I add/make reference lines consistent within a control chart w/ Column Switcher?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458159#M70333</link>
      <description>&lt;P&gt;You could also use Graphic scripts. First calculate indices for the reference lines you have and then add graphic script with V Line:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Quality Control/Coating.jmp");

ccb = dt &amp;lt;&amp;lt; Control Chart Builder(
	Size(528, 456),
	Show Two Shewhart Charts(0),
	Show Control Panel(0),
	Show Limit Summaries(0),
	Variables(Subgroup(:Sample), Y(:Pin)),
	Chart(Points(Statistic("Average")), Limits(Sigma("Levey Jennings"))),
	Column Switcher(:Pin, {:Pin, :Weight, :Weight 2})
);

//calculate indices for references
uniq_vals = Associative Array(dt[0, "Sample"]) &amp;lt;&amp;lt; get keys;
ref_vals = {4, 5, 6, 8};

/*jmp16
ref_idx = Transform Each({ref_val}, ref_vals,
	Contains(uniq_vals, ref_val) - 1
);
*/
//jmp15
ref_idx = [];
For(i = 1, i &amp;lt;= N Items(ref_vals), i++,
	idx = Contains(uniq_vals, ref_vals[i]);
	If(idx,
		Insert Into(ref_idx, idx - 1);
	)
);

//add reference lines as Graphic Script
rep = ccb &amp;lt;&amp;lt; report;
framebox = rep[frame box(1)];
Eval(EvalExpr(framebox &amp;lt;&amp;lt; Add Graphics Script(
	Pen Size(1);
	Pen Color("Blue");
	V Line(Expr(Transpose(ref_idx)));
)));
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 15:37:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-add-make-reference-lines-consistent-within-a-control/m-p/458159#M70333</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-02-03T15:37:10Z</dc:date>
    </item>
  </channel>
</rss>

