<?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: Loop through list, create Tab box, Graph Builder Plot in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672956#M86059</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the expression you suggested in the below discussion but something doesn't seem to work. Any work around for this?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Use-variable-list-of-columns-as-Y-Axis-in-Graph-Builder/td-p/230213" target="_blank"&gt;Use variable list of columns as Y Axis in Graph Builder - JMP User Community&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 13:37:03 GMT</pubDate>
    <dc:creator>Jackie_</dc:creator>
    <dc:date>2023-08-31T13:37:03Z</dc:date>
    <item>
      <title>Loop through list, create Tab box, Graph Builder Plot</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672757#M86043</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to loop through the list to create a tab box and add variables stored in the list in the graph builder. Something doesn't seem to be correct in my jsl code. Any suggestions?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is what I want - Add the columns from each list in X for each tabs&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jackie__0-1693430655836.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56119iCAF2DECBE7AF1407/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jackie__0-1693430655836.png" alt="Jackie__0-1693430655836.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Semiconductor Capability.jmp" );

List1 = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1"};
List2 = {"PNP4", "NPN3", "IVP2", "NPN4", "SIT1"};
List3 = {"INM1", "INM2", "VPM1", "VPM2", "VPM3"};
List4 = {"SNM1", "SPM1", "NPN5", "EP2", "ZD6"};



var expr1 = Expr( Variables() );
For( c = 1, c &amp;lt;= N Items( List1 ), c++,
	x expr1 = Expr(
		X( Position( 1 ), Combine( "Parallel Merged" ) )
	);
	Insert Into( x expr1, List1[c], 1 );
	Insert Into( var expr1, Name Expr( x expr1 ) );
);


var expr2 = Expr( Variables() );
For( c = 1, c &amp;lt;= N Items( List2 ), c++,
	x expr2 = Expr(
		X( Position( 1 ), Combine( "Parallel Merged" ) )
	);
	Insert Into( x expr2, List2[c], 1 );
	Insert Into( var expr2, Name Expr( x expr2 ) );
);

var expr3 = Expr( Variables() );
For( c = 1, c &amp;lt;= N Items( List3 ), c++,
	x expr3 = Expr(
		X( Position( 1 ), Combine( "Parallel Merged" ) )
	);
	Insert Into( x expr3, List3[c], 1 );
	Insert Into( var expr3, Name Expr( x expr3 ) );
);

var expr4 = Expr( Variables() );
For( c = 1, c &amp;lt;= N Items( List4 ), c++,
	x expr4 = Expr(
		X( Position( 1 ), Combine( "Parallel Merged" ) )
	);
	Insert Into( x expr4, List4[c], 1 );
	Insert Into( var expr4, Name Expr( x expr4 ) );
);


lists = {"List1", "List2", "List3", "List4"};

var = {};

For( i = 1, i &amp;lt;= 20, i++, 
	
	Insert Into( var, Parse( "var expr" || Char( i ) ) );
	Insert Into( gbv, Parse( "vvv" || Char( i ) ) )
	
	
	;
);

New Window( "Plots",
	Show Menu( 0 ),
	show toolbars( 0 ), 

	tb = Tab Box()
);
For( i = 1, i &amp;lt;= N Items( lists ), i++,
	tb &amp;lt;&amp;lt; Add(
		lists[i],
		V List Box(
			H List Box(
				gb1 = Eval Expr(
					
							
						
					dt &amp;lt;&amp;lt; Graph Builder(
						Size( 1117, 781 ),
						Show Control Panel( 0 ),
						////something is not correct here?????
						Expr( Name Expr( var[i] ) ),
						Elements(
							Histogram(
								X( 2 ),
								X( 3 ),
								X( 4 ),
								X( 5 ),
								X( 6 ),
								X( 7 ),
								X( 8 ),
								X( 9 ),
								X( 10 ),
								X( 11 ),
								X( 12 ),
								X( 13 ),
								X( 14 ),
								X( 15 ),
								X( 16 ),
								X( 1 ),
								Legend( 2 ), 
							
							),
							Box Plot(
								X( 2 ),
								X( 3 ),
								X( 4 ),
								X( 5 ),
								X( 6 ),
								X( 7 ),
								X( 8 ),
								X( 9 ),
								X( 10 ),
								X( 11 ),
								X( 12 ),
								X( 13 ),
								X( 14 ),
								X( 15 ),
								X( 16 ),
								X( 1 ),
								Legend( 3 ),
								Outliers( 0 )
							)
						)
					)
				),
				gb1, 
				
			
			
			
				Tabulate(
					Show Control Panel( 0 ),
					Set Format( Uniform Format( 10, 2 ) ),
					Add Table(
						Column Table( Statistics( Mean, Std Dev ) ),
						Row Table(
							Analysis Columns(
								Eval( Parse( lists[i] ) )
								
							)
						)
					)

				)
		
		
		
		
		
			)
		)
	);
	
);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jackie&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 21:25:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672757#M86043</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-08-30T21:25:13Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through list, create Tab box, Graph Builder Plot</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672844#M86051</link>
      <description>&lt;P&gt;Have you checked your expressions are being built correctly? First try to get it working with just one list and then add others when that is working. I can't run the script due to this error&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1693457717301.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/56128iF330F8153327F527/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1693457717301.png" alt="jthi_0-1693457717301.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Can insert only into an L-value in access or evaluation of 'Insert Into' , Insert Into/*###*/(gbv, Parse("vvv" || Char(i)))

at line 58 in \Script.jsl&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Aug 2023 04:55:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672844#M86051</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-08-31T04:55:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through list, create Tab box, Graph Builder Plot</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672949#M86058</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This expression works with one list but if I try to add it in the loop, it doesn't work&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(
					Substitute(
							Expr(
								gb2 = dt &amp;lt;&amp;lt; Graph Builder(
									Size( 1117, 781 ),
									Show Control Panel( 0 ),
									vvv1,
									Elements(
										Histogram(
											X( 2 ),
											X( 3 ),
											X( 4 ),
											X( 5 ),
											X( 6 ),
											X( 7 ),
											X( 8 ),
											X( 9 ),
											X( 10 ),
											X( 11 ),
											X( 12 ),
											X( 13 ),
											X( 14 ),
											X( 15 ),
											X( 16 ),
											X( 1 ),
											Legend( 2 ), 
							
										),
										Box Plot(
											X( 2 ),
											X( 3 ),
											X( 4 ),
											X( 5 ),
											X( 6 ),
											X( 7 ),
											X( 8 ),
											X( 9 ),
											X( 10 ),
											X( 11 ),
											X( 12 ),
											X( 13 ),
											X( 14 ),
											X( 15 ),
											X( 16 ),
											X( 1 ),
											Legend( 3 ),
											Outliers( 0 )
										)
									)
								)
							),
						Expr( vvv1 ), Name Expr( var expr1 )
					)
				);
	
	
				tabu = Tabulate(
					Show Control Panel( 0 ),
					Set Format( Uniform Format( 10, 2 ) ),
					Add Table(
						Column Table( Statistics( Mean, Std Dev ) ),
						Row Table(
							Analysis Columns(
								Eval(List1)
								
							)
						)
					)

				)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 13:30:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672949#M86058</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-08-31T13:30:19Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through list, create Tab box, Graph Builder Plot</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672956#M86059</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried using the expression you suggested in the below discussion but something doesn't seem to work. Any work around for this?&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.jmp.com/t5/Discussions/Use-variable-list-of-columns-as-Y-Axis-in-Graph-Builder/td-p/230213" target="_blank"&gt;Use variable list of columns as Y Axis in Graph Builder - JMP User Community&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 13:37:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672956#M86059</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-08-31T13:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through list, create Tab box, Graph Builder Plot</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672957#M86060</link>
      <description>&lt;P&gt;I would most likely rewrite the script to avoid using parse on variable names and having so many lists which you have to keep track of (also if you have JMP16+ using For Each is usually better than For). I did some modifications and now it might work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

List1 = {"NPN1", "PNP1", "PNP2", "NPN2", "PNP3", "IVP1"};
List2 = {"PNP4", "NPN3", "IVP2", "NPN4", "SIT1"};
List3 = {"INM1", "INM2", "VPM1", "VPM2", "VPM3"};
List4 = {"SNM1", "SPM1", "NPN5", "EP2", "ZD6"};

var expr1 = Expr(Variables());
For(c = 1, c &amp;lt;= N Items(List1), c++,
	x expr1 = Expr(
		X(Position(1), Combine("Parallel Merged"))
	);
	Insert Into(x expr1, List1[c], 1);
	Insert Into(var expr1, Name Expr(x expr1));
);

var expr2 = Expr(Variables());
For(c = 1, c &amp;lt;= N Items(List2), c++,
	x expr2 = Expr(
		X(Position(1), Combine("Parallel Merged"))
	);
	Insert Into(x expr2, List2[c], 1);
	Insert Into(var expr2, Name Expr(x expr2));
);

var expr3 = Expr(Variables());
For(c = 1, c &amp;lt;= N Items(List3), c++,
	x expr3 = Expr(
		X(Position(1), Combine("Parallel Merged"))
	);
	Insert Into(x expr3, List3[c], 1);
	Insert Into(var expr3, Name Expr(x expr3));
);

var expr4 = Expr(Variables());
For(c = 1, c &amp;lt;= N Items(List4), c++,
	x expr4 = Expr(
		X(Position(1), Combine("Parallel Merged"))
	);
	Insert Into(x expr4, List4[c], 1);
	Insert Into(var expr4, Name Expr(x expr4));
);


lists = {"List1", "List2", "List3", "List4"};
var = {};
gbv = {};

For(i = 1, i &amp;lt;= 4, i++, 	
	Insert Into(var, Name Expr(Eval(Parse("var expr" || Char(i)))));
	Insert Into(gbv, Parse("vvv" || Char(i)));
);

nw = New Window("Plots",
	Show Menu(0),
	show toolbars(0), 
	tb = Tab Box()
);

For(i = 1, i &amp;lt;= N Items(lists), i++,
	tb &amp;lt;&amp;lt; Add(
		lists[i],
		V List Box(
			H List Box(
				Eval(Eval Expr(	
					dt &amp;lt;&amp;lt; Graph Builder(
						Size(1117, 781),
						Show Control Panel(0), 
						////something is not correct here?????
						Expr(Name Expr(var[i])),
						Elements(
							Histogram(
								X(2),
								X(3),
								X(4),
								X(5),
								X(6),
								X(7),
								X(8),
								X(9),
								X(10),
								X(11),
								X(12),
								X(13),
								X(14),
								X(15),
								X(16),
								X(1),
								Legend(2), 
							
							),
							Box Plot(
								X(2),
								X(3),
								X(4),
								X(5),
								X(6),
								X(7),
								X(8),
								X(9),
								X(10),
								X(11),
								X(12),
								X(13),
								X(14),
								X(15),
								X(16),
								X(1),
								Legend(3),
								Outliers(0)
							)
						)
					)
				)),
				Tabulate(
					Show Control Panel(0),
					Set Format(Uniform Format(10, 2)),
					Add Table(
						Column Table(Statistics(Mean, Std Dev)),
						Row Table(
							Analysis Columns(
								Eval(Parse(lists[i]))
								
							)
						)
					)
				)	
			)
		)
	);	
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Aug 2023 13:53:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672957#M86060</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-08-31T13:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through list, create Tab box, Graph Builder Plot</title>
      <link>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672972#M86061</link>
      <description>&lt;P&gt;Thanks Jarmo!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 14:16:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Loop-through-list-create-Tab-box-Graph-Builder-Plot/m-p/672972#M86061</guid>
      <dc:creator>Jackie_</dc:creator>
      <dc:date>2023-08-31T14:16:47Z</dc:date>
    </item>
  </channel>
</rss>

