<?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 Graph Arrangement with For Loops in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graph-Arrangement-with-For-Loops/m-p/827533#M100921</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I want to understand how to arrange graphs.&lt;BR /&gt;When a user wants to arrange them in two rows with three graphs in each row, I can achieve that using the script below:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Test", 
	
	
	H List Box(
		For( i = 1, i &amp;lt; 4, i++,
			Graph Builder(
				Size( 528, 450 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ) ),
				Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
			)
		),

	),
	H List Box(
		For( i = 1, i &amp;lt; 4, i++,
			Graph Builder(
				Size( 528, 450 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ) ),
				Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
			)
		),

	)
	
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;However, when I use a for loop, I am unable to achieve the same effect, as shown below:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Test", 
	
	For( k = 1, k &amp;lt; 3, k++,
		H List Box(
			For( i = 1, i &amp;lt; 4, i++,
				Graph Builder(
					Size( 528, 450 ),
					Show Control Panel( 0 ),
					Variables( X( :age ), Y( :height ) ),
					Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;What should I modify to make the output of the for loop display the graphs correctly?&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2025 09:29:51 GMT</pubDate>
    <dc:creator>BabyDoragon</dc:creator>
    <dc:date>2025-01-16T09:29:51Z</dc:date>
    <item>
      <title>Graph Arrangement with For Loops</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Arrangement-with-For-Loops/m-p/827533#M100921</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I want to understand how to arrange graphs.&lt;BR /&gt;When a user wants to arrange them in two rows with three graphs in each row, I can achieve that using the script below:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Test", 
	
	
	H List Box(
		For( i = 1, i &amp;lt; 4, i++,
			Graph Builder(
				Size( 528, 450 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ) ),
				Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
			)
		),

	),
	H List Box(
		For( i = 1, i &amp;lt; 4, i++,
			Graph Builder(
				Size( 528, 450 ),
				Show Control Panel( 0 ),
				Variables( X( :age ), Y( :height ) ),
				Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
			)
		),

	)
	
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;However, when I use a for loop, I am unable to achieve the same effect, as shown below:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;New Window( "Test", 
	
	For( k = 1, k &amp;lt; 3, k++,
		H List Box(
			For( i = 1, i &amp;lt; 4, i++,
				Graph Builder(
					Size( 528, 450 ),
					Show Control Panel( 0 ),
					Variables( X( :age ), Y( :height ) ),
					Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) )
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;What should I modify to make the output of the for loop display the graphs correctly?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 09:29:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Arrangement-with-For-Loops/m-p/827533#M100921</guid>
      <dc:creator>BabyDoragon</dc:creator>
      <dc:date>2025-01-16T09:29:51Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Arrangement with For Loops</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Arrangement-with-For-Loops/m-p/827555#M100923</link>
      <description>&lt;P&gt;I suggest you use Lineup Box(N Col(3)) instead of H List Boxes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&lt;/P&gt;
&lt;P&gt;Here is simple example&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

lub = Lineup Box(N Col(3));
For(i = 1, i &amp;lt;= 10, i++,
	lub &amp;lt;&amp;lt; Append(
		dt &amp;lt;&amp;lt; Graph Builder(
			Show Control Panel(0),
			Variables(X(:weight), Y(:height), Overlay(:sex)),
			Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
		);
	)
);

nw = New Window("report",
	lub
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jan 2025 10:14:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Arrangement-with-For-Loops/m-p/827555#M100923</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2025-01-16T10:14:08Z</dc:date>
    </item>
  </channel>
</rss>

