<?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: Graph builder with values not in data table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77939#M36304</link>
    <description>&lt;P&gt;That works. Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Thu, 04 Oct 2018 18:25:16 GMT</pubDate>
    <dc:creator>JeffG</dc:creator>
    <dc:date>2018-10-04T18:25:16Z</dc:date>
    <item>
      <title>Graph builder with values not in data table</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77733#M36240</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to get my script to graph values that are not in a data table but are generated when the script is executed. The program starts with an import of data in two columns similar to this:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Position&lt;/TD&gt;&lt;TD&gt;FocusMetric&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;TD&gt;120&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-4&lt;/TD&gt;&lt;TD&gt;140&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-8&lt;/TD&gt;&lt;TD&gt;165&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-4&lt;/TD&gt;&lt;TD&gt;160&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;-0&lt;/TD&gt;&lt;TD&gt;130&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I then fit a spline up/down the data and determine the offset between the two. The issue comes when I am trying to graph the data. The GraphBuilder doesn't find the variables because they are not in the datatable. Here is my&amp;nbsp;code, everthing seems to work until GraphBuilder. I am trying to get a line graph of offset,splineEval, and a marker for the backlash,splineMin. Any other suggestions are appreciated, this is a new language for me!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//Setup arrays for creating spline over data
x = Index(-100,0,1);
offset = Index(-20,20,0.1);

//Determine position minimum index
rPosMin = dt &amp;lt;&amp;lt; GetRowsWhere(:Position == ColMin(:Position));

//Create spline coeficients over up/down scan of data
splineUp = SplineCoef(:Position[1::rPosMin-1], :FocusMetric[1::rPosMin-1], 1);
splineDown = SplineCoef(:Position[rPosMin+1::NRow()], :FocusMetric[rPosMin+1::NRow()], 1);

//Create array of least squares
for( i=1, i&amp;lt;=length(offset), i++,
	s[i] = Sum(Abs(SplineEval(x,splineDown) - SplineEval((x-offset[i]),splineUp))),
);

//Create spline coefficient over regressed data
si = SplineCoef(offset,s,1);

//Find minimum from regressed data and determine backlash
rSplineMin = Loc(SplineEval(offset,si) == Minimum(SplineEval(offset,si)));
backlash = offset[rSplineMin];
print(backlash);


GraphBuilder(
	ShowControlPanel(0),
	Variables(
		X(offset),
		X(backlash, Position(1)),
		Y(Values(SplineEval(offset,si))),
		Y(rSplineMin, Position(1))
	),
	Elements(Line(X(1), X(2), Y(1), Y(2), Legend(5)))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Oct 2018 15:19:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77733#M36240</guid>
      <dc:creator>JeffG</dc:creator>
      <dc:date>2018-10-03T15:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Graph builder with values not in data table</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77860#M36281</link>
      <description>&lt;P&gt;JMP Analysis and Grpah platforms require a columns from a reference table.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a table from the calculated, offset, backlash, etc. matrix values, then define GraphBuilder using this new table.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 07:37:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77860#M36281</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-10-04T07:37:13Z</dc:date>
    </item>
    <item>
      <title>Re: Graph builder with values not in data table</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77915#M36294</link>
      <description>&lt;P&gt;Ok I can do that.&amp;nbsp;Once I have them in a datatable is it possible to select one point to make as a marker without having to create a new column for every individual point? I'm trying to put a marker on the minimum point but when I try to set X,Y in GraphBuilder at that index, I get the error "Specified column not found in data table"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;GraphBuilder(
	ShowControlPanel(0),
	Variables(
		X(:xoff),
		X(:xoff[rSplineMin], Position(1)),
		Y(:spline),
		Y(:spline[rSplineMin], Position(1))
		
	),
	Elements(Line(X(1), X(2), Y(1) Y(2), Legend(3))),&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How would I go about scripting to select that single point and put a marker there?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 14:49:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77915#M36294</guid>
      <dc:creator>JeffG</dc:creator>
      <dc:date>2018-10-04T14:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: Graph builder with values not in data table</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77938#M36303</link>
      <description>&lt;P&gt;I think it would be easier to add the minimum values as a row in the table. The spline points would have a Value of Spline and the extra point a Value of Backlash, then call it out as a special type of&amp;nbsp; GraphBuilder element.&amp;nbsp; This curve might look strange because it uses your example data.&amp;nbsp; The script is attached.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 559px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/12693iED00908E632D0D74/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 17:55:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77938#M36303</guid>
      <dc:creator>gzmorgan0</dc:creator>
      <dc:date>2018-10-04T17:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Graph builder with values not in data table</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77939#M36304</link>
      <description>&lt;P&gt;That works. Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 04 Oct 2018 18:25:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-builder-with-values-not-in-data-table/m-p/77939#M36304</guid>
      <dc:creator>JeffG</dc:creator>
      <dc:date>2018-10-04T18:25:16Z</dc:date>
    </item>
  </channel>
</rss>

