<?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: Adding reference lines in variability plot in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926781#M108460</link>
    <description>&lt;P&gt;Hi Jarmo,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. In my case, I want to loop through the&amp;nbsp;&lt;SPAN&gt;PARAMETER in dt which may or may not be present in the dtr. Also there might be more than one row with the same PARAMETER&amp;nbsp; ( images multiple measurements)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. In your script, I could not tell which plot is for which Zone. I will need have the name of the variability plot as that of Parameter.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 28 Jan 2026 00:02:14 GMT</pubDate>
    <dc:creator>NewToThis</dc:creator>
    <dc:date>2026-01-28T00:02:14Z</dc:date>
    <item>
      <title>Adding reference lines in variability plot</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926760#M108454</link>
      <description>&lt;P&gt;I have two tables&lt;/P&gt;
&lt;P&gt;Table1 is dt=Data Table("Data"); It has columns :WAFER, :STRUCTURE, :PARAMETER and :Value&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table2 is dtr= Data Table("Targets"); it has columns :PARAMETER, USL, LSL &amp;amp; Target&lt;/P&gt;
&lt;P&gt;In one window ( that is active and can be used for point selection or changing legends) I want to have variability charts of all the parameters along with reference lines added (Target, USL, LSL) for each PARAMETER&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if a parameter does not have a target, in the Targets file (dtr) but has data in the DATA file (dt) , the variability plot is created without the reference lines. Otherwise reference lines are added&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw &amp;lt;&amp;lt; Append(
	vc = dt &amp;lt;&amp;lt; Variability Chart(
		Y(:Normalize Value),
		X(:STRUCTURE, :WAFER),
		Variability Analysis(
			:Value,
			Connect Cell Means(1),
			Std Dev Chart(0),
			Points Jittered(1),
			AIAG Labels(0),
			Show Box Plots(1)
		),
		Where(:Parameter == currentParam),
		SendToReport(
			Dispatch({"Variability Chart for Normalize Value"}, "2", ScaleBox,
				{Add Ref Line(lsl, "Dotted", "Red", "LSL", 2),
				Add Ref Line(target, "Solid", "Black", "Target", 2),
				Add Ref Line(usl, "Dotted", "Red", "USL", 2)}
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Edit (jthi): added jsl formatting&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 21:00:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926760#M108454</guid>
      <dc:creator>NewToThis</dc:creator>
      <dc:date>2026-01-27T21:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: Adding reference lines in variability plot</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926774#M108456</link>
      <description>&lt;P&gt;Use For Each Row to loop over your targets table (assuming all parameters are there) and create plots in the loop. You can have separate variability chart messages for different cases (limits/no limits). For the limits one, use expression evaluation to add the limits.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 21:04:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926774#M108456</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-01-27T21:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: Adding reference lines in variability plot</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926777#M108457</link>
      <description>&lt;P&gt;Example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt_limits = New Table("Cities Limits",
	Add Rows(4),
	New Column("Process",
		Character,
		Set Values({"OZONE", "CO", "SO2", "NO"})
	),
	New Column("LSL", Numeric, Set Values([-20, -30, -25, -10])),
	New Column("Target", Numeric, Set Values([5, ., 1, 5])),
	New Column("USL", Numeric, Set Values([20, 30, 10, 25])),
	Set Label Columns(:Process)
);

dt = Open("$SAMPLE_DATA/Cities.jmp");
dt_stack = dt &amp;lt;&amp;lt; Stack(
	columns(:OZONE, :CO, :SO2, :NO, :PM10, :Lead),
	Output Table("Stack of Cities (OZONE, CO, SO2, NO, PM10, Lead)")
);
Close(dt, no save);

nw = New Window("",
	vlb = V List Box()
);

For Each Row(dt_limits,
	lowlimit = :LSL;
	highlimit = :USL;
	targetlimit = :Target;
	
	If(Is Missing(targetlimit),
		vlb &amp;lt;&amp;lt; Append(dt_stack &amp;lt;&amp;lt; Variability Chart(Y(:Data), Model("Main Effect"), X(:city)))
	,
		vlb &amp;lt;&amp;lt; Append(Eval(EvalExpr(
			dt_stack &amp;lt;&amp;lt; Variability Chart(
				Y(:Data),
				Model("Main Effect"),
				X(:city),
				SendToReport(
					Dispatch(
						{"Variability Gauge Analysis for Data", "Variability Chart for Data"},
						"2", ScaleBox,
						{Add Ref Line(Expr(lowlimit), "Dotted", "Red", "LSL", 2),
						Add Ref Line(Expr(targetlimit), "Solid", "Black", "Target", 2),
						Add Ref Line(Expr(highlimit), "Dotted", "Red", "USL", 2)}
					)
				)
			);
		)));
	);
);

Write();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1769548334611.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/92366i3BF9CFD3A5F0D066/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1769548334611.png" alt="jthi_1-1769548334611.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jan 2026 21:12:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926777#M108457</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-01-27T21:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Adding reference lines in variability plot</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926781#M108460</link>
      <description>&lt;P&gt;Hi Jarmo,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. In my case, I want to loop through the&amp;nbsp;&lt;SPAN&gt;PARAMETER in dt which may or may not be present in the dtr. Also there might be more than one row with the same PARAMETER&amp;nbsp; ( images multiple measurements)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;2. In your script, I could not tell which plot is for which Zone. I will need have the name of the variability plot as that of Parameter.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2026 00:02:14 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926781#M108460</guid>
      <dc:creator>NewToThis</dc:creator>
      <dc:date>2026-01-28T00:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Adding reference lines in variability plot</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926784#M108463</link>
      <description>&lt;P&gt;I used the logic below but having difficulty in adding the limits&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;paramList = Associative Array(:Parameter &amp;lt;&amp;lt; Get Values) &amp;lt;&amp;lt; Get Keys;
For(i = 1, i &amp;lt;= N Items(paramList), i++,
	currentParam = paramList[i]
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Edit (jthi): added jsl formatting&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2026 05:34:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926784#M108463</guid>
      <dc:creator>NewToThis</dc:creator>
      <dc:date>2026-01-28T05:34:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding reference lines in variability plot</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926808#M108465</link>
      <description>&lt;P&gt;Which part are you having problems with? Adding limits to associative array?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Jan 2026 05:35:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-reference-lines-in-variability-plot/m-p/926808#M108465</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-01-28T05:35:16Z</dc:date>
    </item>
  </channel>
</rss>

