<?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: Building Multiple Graphs from one Data Table in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314729#M56673</link>
    <description>&lt;P&gt;If I misunderstood what you meant by "window" - and that what you really want are lots of graphs in a single window then you need to put the graph in a container (that prevents it being rendered immediately) and then append it to a pre-existing display box (hlb in this example)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/Big Class.jmp");
cols = dt &amp;lt;&amp;lt; get column names;
NewWindow("Demo",
	hlb = HListBox()
);
for (i=1,i&amp;lt;=nitems(cols),i++,
	content = VListBox(
		dt &amp;lt;&amp;lt; Graph Builder(
			Size( 353, 317 ),
			Show Control Panel( 0 ),
			Variables( X( :height ), Y( eval(cols[i]) ) )
		)
	);
	hlb &amp;lt;&amp;lt; append(content)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 29 Sep 2020 18:59:53 GMT</pubDate>
    <dc:creator>David_Burnham</dc:creator>
    <dc:date>2020-09-29T18:59:53Z</dc:date>
    <item>
      <title>Building Multiple Graphs from one Data Table</title>
      <link>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314680#M56665</link>
      <description>&lt;P&gt;When I build a graph from a dt like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb = Data_Table &amp;lt;&amp;lt; Graph Builder(
		Size( 534, 454 ),
		Show Control Panel( 0 ),
		Show Legend( 0 ),
		Variables( 
			X( :Split ),
			X( :Wafer, Position( 1 ) ),
			Y( As Column( analysisTests[i] ) ),
			Color( :Split ) 
		),
		Elements( 
			Points( X( 1 ), X( 2 ), Y, Legend( 21 ) ),
			Box Plot( X( 1 ), X( 2 ), Y, Legend( 22 ) ) 
		)
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;It works great.&amp;nbsp; However, if I put it all in a loop, hoping to generate a set of graphs (one for each of the column labels) each in their own window, it just updates the first graph instead:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;for(i = 1, i &amp;lt;= N Items(analysisTests), i++,
     gb = Data_Table &amp;lt;&amp;lt; Graph Builder(
		Size( 534, 454 ),
		Show Control Panel( 0 ),
		Show Legend( 0 ),
		Variables( 
			X( :Split ),
			X( :Wafer, Position( 1 ) ),
			Y( As Column( analysisTests[i] ) ),
			Color( :Split ) 
		),
		Elements( 
			Points( X( 1 ), X( 2 ), Y, Legend( 21 ) ),
			Box Plot( X( 1 ), X( 2 ), Y, Legend( 22 ) ) 
		)
	);
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How do I get it to show a set of graphs, each in it's own window?&amp;nbsp; It seems like because its asking for a graph based on a data table I would need multiple data tables each with it's own graph, but it seems like there should be an easier way.&amp;nbsp; I tried gb[i] hoping to get a separate graph for each loop, but that gives an error. --&amp;nbsp;Not subscriptable value in access or evaluation of 'Assign'&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:19:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314680#M56665</guid>
      <dc:creator>Lindeman1arr</dc:creator>
      <dc:date>2023-06-10T23:19:42Z</dc:date>
    </item>
    <item>
      <title>Re: Building Multiple Graphs from one Data Table</title>
      <link>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314721#M56669</link>
      <description>Hi,&lt;BR /&gt;One way to do this is 1) create a new window and a ListBox outside the loop, 2) Append each graph to the ListBox within the loop, and 3) Append the new window with the ListBox after the loop closes. I don't have the time to give you a complete script solution but you might be able to figure it out with the Scripting Help and Manual.&lt;BR /&gt;Best,&lt;BR /&gt;TS</description>
      <pubDate>Tue, 29 Sep 2020 17:54:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314721#M56669</guid>
      <dc:creator>Thierry_S</dc:creator>
      <dc:date>2020-09-29T17:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: Building Multiple Graphs from one Data Table</title>
      <link>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314728#M56672</link>
      <description>&lt;P&gt;Not sure why that is - I would expect the default action to be that separate windows are created; as in this script:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/Big Class.jmp");
cols = dt &amp;lt;&amp;lt; get column names;
for (i=1,i&amp;lt;=nitems(cols),i++,
	dt &amp;lt;&amp;lt; Graph Builder(
		Size( 353, 317 ),
		Show Control Panel( 0 ),
		Variables( X( :height ), Y( eval(cols[i]) ) )
	);
)&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, 29 Sep 2020 18:41:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314728#M56672</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2020-09-29T18:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Building Multiple Graphs from one Data Table</title>
      <link>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314729#M56673</link>
      <description>&lt;P&gt;If I misunderstood what you meant by "window" - and that what you really want are lots of graphs in a single window then you need to put the graph in a container (that prevents it being rendered immediately) and then append it to a pre-existing display box (hlb in this example)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open("$SAMPLE_DATA/Big Class.jmp");
cols = dt &amp;lt;&amp;lt; get column names;
NewWindow("Demo",
	hlb = HListBox()
);
for (i=1,i&amp;lt;=nitems(cols),i++,
	content = VListBox(
		dt &amp;lt;&amp;lt; Graph Builder(
			Size( 353, 317 ),
			Show Control Panel( 0 ),
			Variables( X( :height ), Y( eval(cols[i]) ) )
		)
	);
	hlb &amp;lt;&amp;lt; append(content)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:59:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314729#M56673</guid>
      <dc:creator>David_Burnham</dc:creator>
      <dc:date>2020-09-29T18:59:53Z</dc:date>
    </item>
    <item>
      <title>Re: Building Multiple Graphs from one Data Table</title>
      <link>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314908#M56701</link>
      <description>&lt;P&gt;Thanks David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is actually exactly what I was doing, but it was only showing the last one.&amp;nbsp; I ended up finding a bug in part of the "extra" script I didn't show and once that was fixed it started working correctly.&amp;nbsp; So you're answer showed me that I was doing it right and pointed me in the right direction to finding the real problem.&amp;nbsp; Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 11:57:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Building-Multiple-Graphs-from-one-Data-Table/m-p/314908#M56701</guid>
      <dc:creator>Lindeman1arr</dc:creator>
      <dc:date>2020-09-30T11:57:53Z</dc:date>
    </item>
  </channel>
</rss>

