<?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 define the control limits from a column using graph builder? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411289#M66077</link>
    <description>&lt;P&gt;Thank you. it worked, although I still do not know if I have some missing data in a column, how I can pick the cell with data. But in this case using the functions worked.&lt;/P&gt;&lt;P&gt;:)&lt;/img&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 19 Aug 2021 15:33:36 GMT</pubDate>
    <dc:creator>Mikasa</dc:creator>
    <dc:date>2021-08-19T15:33:36Z</dc:date>
    <item>
      <title>How to define the control limits from a column using graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/406319#M65650</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;I am using graph builder to make the graphs in a report. I like to add the refence lines on the graph as CL,LCL,UCL. I have them in the columns (eg. X) in my table. I am trying to call them in the script like,&lt;/P&gt;&lt;P&gt;{Add Ref Line(:X, "Solid", "Black", "LCL", 1 )}&lt;/P&gt;&lt;P&gt;But it does not work&lt;/P&gt;&lt;P&gt;Could you please help me&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 19:53:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/406319#M65650</guid>
      <dc:creator>Mikasa</dc:creator>
      <dc:date>2023-06-09T19:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to define the control limits from a column using graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/406367#M65654</link>
      <description>&lt;P&gt;Depending on your data you could do it this way:&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/Big Class.jmp");
//add limit columns
dt &amp;lt;&amp;lt; New Column("UCL", Numeric, Continuous, Set Each Value(70));
dt &amp;lt;&amp;lt; New Column("CL", Numeric, Continuous, Set Each Value(60));
dt &amp;lt;&amp;lt; New Column("LCL", Numeric, Continuous, Set Each Value(50));

gb = Graph Builder(Variables(X(:age), Y(:height)), Elements(Points(X, Y, Legend(4))));

axisb = (report(gb)[axisbox(2)]);
axisb &amp;lt;&amp;lt; ({
	Add Ref Line(dt:UCL[1], "Solid", "Black", "UCL", 1),
	Add Ref Line(dt:CL[1], "Solid", "Black", "CL", 1),
	Add Ref Line(dt:LCL[1], "Solid", "Black", "LCL", 1)
});&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Or plot those columns directly:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1627925080072.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34695i6F6A10F7B3051F82/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1627925080072.png" alt="jthi_0-1627925080072.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;or set those to column properties as spec limits:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_1-1627925249262.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34699i83F7A6D2F85EB40E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_1-1627925249262.png" alt="jthi_1-1627925249262.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_2-1627925256368.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/34706i910B581120182125/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_2-1627925256368.png" alt="jthi_2-1627925256368.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All these can be scripted if needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit:&lt;/P&gt;&lt;P&gt;And if you meant you have Control Limit Column property set, it will require a bit extra scripting to get the limits out of column property (parse part will most depend a bit on case and how control limits are set, but the idea should be same):&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");
obj = dt &amp;lt;&amp;lt; Control Chart(Sample Size(:Sample), KSigma(3), Chart Col(:Weight, XBar, R));
Wait(0);
obj &amp;lt;&amp;lt; Save Limits(in Column);

gb = Graph Builder(
	Variables(X(:Sample), Y(:Weight)),
	Elements(Points(X, Y, Legend(3)), Smoother(X, Y, Legend(4)))
);

//get Control Limits column property and parse limits
colProp = dt:weight &amp;lt;&amp;lt; Get Property("Control Limits");
xbarLimits = Words(Char(colProp[1]));
xbarCL = Num(Word(3, xbarLimits[1], "()"));
xbarLCL = Num(Word(2, xbarLimits[2], "()"));
xbarUCL = Num(Word(2, xbarLimits[3], "()"));

//add control limits
axisb = (report(gb)[axisbox(2)]);
axisb &amp;lt;&amp;lt; ({
	Add Ref Line(xbarUCL, "Solid", "Black", "UCL", 1),
	Add Ref Line(xbarCL, "Solid", "Black", "CL", 1),
	Add Ref Line(xbarLCL, "Solid", "Black", "LCL", 1)
});&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Aug 2021 17:47:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/406367#M65654</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-08-02T17:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to define the control limits from a column using graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411251#M66071</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;, Thank you.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the control limits as columns. I can call one cell as UCL[1], but the problem is, some of these columns have empty cells that might be the first or any other cell. I want to add the Ref line from the cell in the column which is not empty.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have any idea how I can do that?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 14:43:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411251#M66071</guid>
      <dc:creator>Mikasa</dc:creator>
      <dc:date>2021-08-19T14:43:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to define the control limits from a column using graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411258#M66073</link>
      <description>&lt;P&gt;Could you provide some sort of an example data table? It doesn't have any real data as long as it shows the basic idea of the data. Depending on how the data looks, you could maybe ColMin/ColMax functions like ColMin(dt:UCL).&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 15:03:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411258#M66073</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-08-19T15:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to define the control limits from a column using graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411289#M66077</link>
      <description>&lt;P&gt;Thank you. it worked, although I still do not know if I have some missing data in a column, how I can pick the cell with data. But in this case using the functions worked.&lt;/P&gt;&lt;P&gt;:)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Aug 2021 15:33:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411289#M66077</guid>
      <dc:creator>Mikasa</dc:creator>
      <dc:date>2021-08-19T15:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to define the control limits from a column using graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411300#M66079</link>
      <description>&lt;P&gt;ColMin and ColMax will just take minimum or maximum value from the column and ignoring the missing value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some quick examples:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = New Table("Untitled",
	Add Rows(5),
	New Column("Value", Numeric, "Continuous", Format("Best", 12), Set Values([., 1, ., ., 2]))
);

Show(ColMin(:Value));
Show(ColMax(:Value));

//A bit more complicated. Loc gets rows which have non missing value as a matrix
//Then we use that matrix to get values from Value column
//and finally from that we will use only the first index
Show(:Value[Loc(:Value &amp;lt;&amp;lt; get as matrix)][1]);
//You can run this in parts to see how it works
//Loc(:Value &amp;lt;&amp;lt; get as matrix)
//:Value[Loc(:Value &amp;lt;&amp;lt; get as matrix)]

//Will return missing value
Show(:Value[1]);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Aug 2021 15:42:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-define-the-control-limits-from-a-column-using-graph/m-p/411300#M66079</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2021-08-19T15:42:44Z</dc:date>
    </item>
  </channel>
</rss>

