<?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: sliders update a table that updates a graph in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214148#M42815</link>
    <description>&lt;P&gt;I've put the contourplot in a display box container and it seems to work ok.&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);
RangeMin = Associative array(["C flow" =&amp;gt; 180,
"D flow" =&amp;gt; 165,
"Time" =&amp;gt; 33,
"Pressure" =&amp;gt; 200,
"Temp" =&amp;gt; 610,
"A flow" =&amp;gt; 180,
"B flow" =&amp;gt; 165]);
RangeMax = Associative Array(["C flow" =&amp;gt; 355,
"D flow" =&amp;gt; 325,
"Time" =&amp;gt; 44,
"Pressure" =&amp;gt; 350,
"Temp" =&amp;gt; 630,
"A flow" =&amp;gt; 355,
"B flow" =&amp;gt; 450]);
SliderVars = {620.869565217391, 40.5217391304348, 268.478260869565, 263.260869565217,
288.913043478261, 271.086956521739, 247.608695652174, 263.43, 40.5217391304348,
268.478260869565, 263.260869565217, 288.913043478261, 271.086956521739,
247.608695652174, 620.869565217391, 40.5217391304348, 268.478260869565,
263.260869565217, 288.913043478261, 271.086956521739, 247.608695652174};
XColumns = {"Temp", "Time", "Pressure", "A flow", "B flow",
"C flow", "D flow"};
GraphingTable = Current Data Table();

sjaakie = New window("test", testlist = h list box());

CPcontent = VListBox(
	GraphingTable &amp;lt;&amp;lt; Contour Plot(
		X( :X, :Y ),
		Y( :Models ),
		Show Data Points( 1 ),
		Fill Areas( 1 ),
		Label Contours( 0 ),
		Color Theme( "Spectral" ),
		Automatic Recalc( 1 )
	)
);

ValuesOutlineBox = Outline Box("Values", SliderList = v list box());

For(i=1, i&amp;lt;= n items(XColumns),i++,
	SliderList &amp;lt;&amp;lt; append(
		h list box(
			Text box(XColumns[i]),
			eval(
				parse(
					eval insert(
						"Var^char(i)^ = ^SliderVars[i]^;
						SB^char(i)^ = Slider Box(
							^RangeMin &amp;lt;&amp;lt; get value(XColumns[i])^,
							^RangeMax &amp;lt;&amp;lt; get value(XColumns[i])^,
							Var^char(i)^,
							NEB^char(i)^ &amp;lt;&amp;lt; set( Var^char(i)^ );
							^Column(GraphingTable, XColumns[i])^ &amp;lt;&amp;lt; set values(J(n rows(),1,Var^char(i)^));
						);"
					);
				);
			),
			eval(
				parse(
					eval insert(
						"NEB^char(i)^ = Number Edit Box( Var^char(i)^,
							&amp;lt;&amp;lt;setfunction(
								Function( {this},
									Var^char(i)^ = this &amp;lt;&amp;lt; get;
									SB^char(i)^ &amp;lt;&amp;lt; inval;
									^Column(GraphingTable, XColumns[i])^ &amp;lt;&amp;lt; set values(J(n rows(),1,Var^char(i)^));
								)
							)
						);"
					);
				);
			),
		)
	)
);


testlist &amp;lt;&amp;lt; append(ValuesOutlineBox);
testlist &amp;lt;&amp;lt; append(CPcontent);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Jun 2019 20:35:26 GMT</pubDate>
    <dc:creator>David_Burnham</dc:creator>
    <dc:date>2019-06-21T20:35:26Z</dc:date>
    <item>
      <title>sliders update a table that updates a graph</title>
      <link>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/213503#M42712</link>
      <description>&lt;P&gt;I'm trying to use sliders to update a table, then the models in the model columns update to predict new values (on a wafer map) which then redraws the contourplot. The problem is that when you turn automatic recalc on and append the sliders to the contourplot, the sliders get thrown out on recalc.&lt;/P&gt;&lt;P&gt;I can keep the sliders and the contourplot in seperate windows but then I have a problem if I work in a JMP project and I have to get into scripting the tab report layout.&lt;/P&gt;&lt;P&gt;I do not need to stay within a table - graph with sliders format, we could also do all of it in memory but I don't think that rebuilding the contourplot in code is fun. Graph builder is also fine as long as I can draw point maps.&lt;/P&gt;&lt;P&gt;The current solution in this new window() works but when moving the sliders I'm deleting and reattaching the updated contour plot which is a bit of a hack job and slow. So i'm looking for a better solution!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 726px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/17799iAFD321E698B1BAC3/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Example table attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example script attached and here:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names default to here(1);
RangeMin = Associative array(["C flow" =&amp;gt; 180,
"D flow" =&amp;gt; 165,
"Time" =&amp;gt; 33,
"Pressure" =&amp;gt; 200,
"Temp" =&amp;gt; 610,
"A flow" =&amp;gt; 180,
"B flow" =&amp;gt; 165]);
RangeMax = Associative Array(["C flow" =&amp;gt; 355,
"D flow" =&amp;gt; 325,
"Time" =&amp;gt; 44,
"Pressure" =&amp;gt; 350,
"Temp" =&amp;gt; 630,
"A flow" =&amp;gt; 355,
"B flow" =&amp;gt; 450]);
SliderVars = {620.869565217391, 40.5217391304348, 268.478260869565, 263.260869565217,
288.913043478261, 271.086956521739, 247.608695652174, 263.43, 40.5217391304348,
268.478260869565, 263.260869565217, 288.913043478261, 271.086956521739,
247.608695652174, 620.869565217391, 40.5217391304348, 268.478260869565,
263.260869565217, 288.913043478261, 271.086956521739, 247.608695652174};
XColumns = {"Temp", "Time", "Pressure", "A flow", "B flow",
"C flow", "D flow"};
GraphingTable = Current Data Table();

sjaakie = New window("test", testlist = h list box());

CP = GraphingTable &amp;lt;&amp;lt; Contour Plot(
	X( :X, :Y ),
	Y( :Models ),
	Show Data Points( 1 ),
	Fill Areas( 1 ),
	Label Contours( 0 ),
	Color Theme( "Spectral" ),
	Automatic Recalc( 1 )
);

ValuesOutlineBox = Outline Box("Values", SliderList = v list box());
For(i=1, i&amp;lt;= n items(XColumns),i++,
	SliderList &amp;lt;&amp;lt; append(
		h list box(
			Text box(XColumns[i]),
			eval(
				parse(
					eval insert(
						"Var^char(i)^ = ^SliderVars[i]^;
						SB^char(i)^ = Slider Box(
							^RangeMin &amp;lt;&amp;lt; get value(XColumns[i])^,
							^RangeMax &amp;lt;&amp;lt; get value(XColumns[i])^,
							Var^char(i)^,
							NEB^char(i)^ &amp;lt;&amp;lt; set( Var^char(i)^ );
							^Column(GraphingTable, XColumns[i])^ &amp;lt;&amp;lt; set values(J(n rows(),1,Var^char(i)^));
							testlist[2] &amp;lt;&amp;lt; Delete Box();
							wait(0.1);
							testlist &amp;lt;&amp;lt; append(report(CP));
						);"
					);
				);
			),
			eval(
				parse(
					eval insert(
						"NEB^char(i)^ = Number Edit Box( Var^char(i)^,
							&amp;lt;&amp;lt;setfunction(
								Function( {this},
									Var^char(i)^ = this &amp;lt;&amp;lt; get;
									SB^char(i)^ &amp;lt;&amp;lt; inval;
									^Column(GraphingTable, XColumns[i])^ &amp;lt;&amp;lt; set values(J(n rows(),1,Var^char(i)^));
									testlist[2] &amp;lt;&amp;lt; Delete Box();
									wait(0.1);
									testlist &amp;lt;&amp;lt; append(report(CP));
								)
							)
						);"
					);
				);
			),
		)
	)
);

testlist &amp;lt;&amp;lt; append(ValuesOutlineBox);
testlist &amp;lt;&amp;lt; append(report(CP));
sjaakie &amp;lt;&amp;lt; Bring Window To Front();&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jun 2019 17:01:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/213503#M42712</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2019-06-18T17:01:37Z</dc:date>
    </item>
    <item>
      <title>Re: sliders update a table that updates a graph</title>
      <link>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214062#M42796</link>
      <description>&lt;P&gt;You might want to come up with a more trivial example based on a standard data table that we all have access to, then we can have some code that we can run and comment on.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 11:10:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214062#M42796</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2019-06-21T11:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: sliders update a table that updates a graph</title>
      <link>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214148#M42815</link>
      <description>&lt;P&gt;I've put the contourplot in a display box container and it seems to work ok.&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);
RangeMin = Associative array(["C flow" =&amp;gt; 180,
"D flow" =&amp;gt; 165,
"Time" =&amp;gt; 33,
"Pressure" =&amp;gt; 200,
"Temp" =&amp;gt; 610,
"A flow" =&amp;gt; 180,
"B flow" =&amp;gt; 165]);
RangeMax = Associative Array(["C flow" =&amp;gt; 355,
"D flow" =&amp;gt; 325,
"Time" =&amp;gt; 44,
"Pressure" =&amp;gt; 350,
"Temp" =&amp;gt; 630,
"A flow" =&amp;gt; 355,
"B flow" =&amp;gt; 450]);
SliderVars = {620.869565217391, 40.5217391304348, 268.478260869565, 263.260869565217,
288.913043478261, 271.086956521739, 247.608695652174, 263.43, 40.5217391304348,
268.478260869565, 263.260869565217, 288.913043478261, 271.086956521739,
247.608695652174, 620.869565217391, 40.5217391304348, 268.478260869565,
263.260869565217, 288.913043478261, 271.086956521739, 247.608695652174};
XColumns = {"Temp", "Time", "Pressure", "A flow", "B flow",
"C flow", "D flow"};
GraphingTable = Current Data Table();

sjaakie = New window("test", testlist = h list box());

CPcontent = VListBox(
	GraphingTable &amp;lt;&amp;lt; Contour Plot(
		X( :X, :Y ),
		Y( :Models ),
		Show Data Points( 1 ),
		Fill Areas( 1 ),
		Label Contours( 0 ),
		Color Theme( "Spectral" ),
		Automatic Recalc( 1 )
	)
);

ValuesOutlineBox = Outline Box("Values", SliderList = v list box());

For(i=1, i&amp;lt;= n items(XColumns),i++,
	SliderList &amp;lt;&amp;lt; append(
		h list box(
			Text box(XColumns[i]),
			eval(
				parse(
					eval insert(
						"Var^char(i)^ = ^SliderVars[i]^;
						SB^char(i)^ = Slider Box(
							^RangeMin &amp;lt;&amp;lt; get value(XColumns[i])^,
							^RangeMax &amp;lt;&amp;lt; get value(XColumns[i])^,
							Var^char(i)^,
							NEB^char(i)^ &amp;lt;&amp;lt; set( Var^char(i)^ );
							^Column(GraphingTable, XColumns[i])^ &amp;lt;&amp;lt; set values(J(n rows(),1,Var^char(i)^));
						);"
					);
				);
			),
			eval(
				parse(
					eval insert(
						"NEB^char(i)^ = Number Edit Box( Var^char(i)^,
							&amp;lt;&amp;lt;setfunction(
								Function( {this},
									Var^char(i)^ = this &amp;lt;&amp;lt; get;
									SB^char(i)^ &amp;lt;&amp;lt; inval;
									^Column(GraphingTable, XColumns[i])^ &amp;lt;&amp;lt; set values(J(n rows(),1,Var^char(i)^));
								)
							)
						);"
					);
				);
			),
		)
	)
);


testlist &amp;lt;&amp;lt; append(ValuesOutlineBox);
testlist &amp;lt;&amp;lt; append(CPcontent);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 20:35:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214148#M42815</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2019-06-21T20:35:26Z</dc:date>
    </item>
    <item>
      <title>Re: sliders update a table that updates a graph</title>
      <link>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214151#M42817</link>
      <description>&lt;P&gt;FYI&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;when you are using the eval(parse(evalinsert( ... ))) construction you don't need to "char" the variables.&amp;nbsp; So you can write&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;SB^i^ = Slider Box( . . . )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the content is already a string, so the char is redundant.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Jun 2019 20:48:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214151#M42817</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2019-06-21T20:48:46Z</dc:date>
    </item>
    <item>
      <title>Re: sliders update a table that updates a graph</title>
      <link>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214250#M42845</link>
      <description>Yeah artifact from another technique that I tried first, thanks for your help!</description>
      <pubDate>Mon, 24 Jun 2019 07:39:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/sliders-update-a-table-that-updates-a-graph/m-p/214250#M42845</guid>
      <dc:creator>pauldeen</dc:creator>
      <dc:date>2019-06-24T07:39:34Z</dc:date>
    </item>
  </channel>
</rss>

