<?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: How to add box plots to points when supplied Y variables as list to graph builder? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701397#M88600</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;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;In the main script below, I have added Local Data Filter () under Eval() which works as intended&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval( gb_expr &amp;lt;&amp;lt;Local Data Filter( Add Filter( columns( :SITE ), Where( :SITE == {2, 3, 4} ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but if I add add the script for updating the markers&amp;nbsp;the chart gets plotted twice!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(
	server = gb_expr &amp;lt;&amp;lt; Get Legend Server;
	For Each( {item}, server &amp;lt;&amp;lt; Get Legend Items, item &amp;lt;&amp;lt; Set Properties( {Marker( "Circle" )} ) );
);&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&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 );
Clear Log();

dt = Open( "$sample_data\Semiconductor Capability.jmp" );

y_values = {"NPN1", "IVP1", "PNP4", "NPN4"};

variables_expr = Expr(
	Variables( X( :lot_id ) )
);
For Each( {y_col}, y_values,
	temp_expr = Expr( Y() );
	Insert Into( temp_expr, Name Expr( As Column( dt, y_col ) ) );
	Insert Into( variables_expr, Name Expr( temp_expr ) );
);
gb_expr = Expr(
	Graph Builder( Show Control Panel( 0 ) )
);
Insert Into( gb_expr, Name Expr( variables_expr ) );
For Each( {y_col, idx}, y_values,
	Eval(
		Eval Expr(
			Insert Into(
				gb_expr,
				Name Expr(
					Elements(
						Position( 1, Expr( idx ) ),
						Points( X, Y, Legend( Expr( idx ) ), jitter( "None" ) ),
						Box Plot( X, Y, Legend( Expr( N Items( y_values ) + idx ), jitter( "None" ) ) )
					)
				)
			)
		)
	)
);

//Show( Name Expr( gb_expr ) );
Eval( gb_expr &amp;lt;&amp;lt;Local Data Filter( Add Filter( columns( :SITE ), Where( :SITE == {2, 3, 4} ) ) ) );

Eval(
	server = gb_expr &amp;lt;&amp;lt; Get Legend Server;
	For Each( {item}, server &amp;lt;&amp;lt; Get Legend Items, item &amp;lt;&amp;lt; Set Properties( {Marker( "Circle" )} ) );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The second chart is with the updated markers.&lt;/P&gt;&lt;P&gt;How to plot a single chart with the updated markers together the local data filter?&lt;/P&gt;&lt;P&gt;I guess, I am unable to place the the last piece for marker change correctly where I request some help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Nov 2023 13:36:43 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2023-11-21T13:36:43Z</dc:date>
    <item>
      <title>How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/700995#M88549</link>
      <description>&lt;P&gt;The following example script from an &lt;A href="https://community.jmp.com/t5/Discussions/How-to-pass-Y-variable-in-Graph-Builder-from-a-List-in-JSL/m-p/683040/highlight/true#M86857" target="_self"&gt;earlier thread&lt;/A&gt; (solved, thanks to&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;) of mine allow me to plot Y variables as points when Y variables are supplied from a list.&lt;/P&gt;&lt;P&gt;I want to add &lt;EM&gt;Box Plots&lt;/EM&gt; in addition to &lt;EM&gt;Points&lt;/EM&gt; in my chart. How to add box plots in the script below?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$sample_data\Big Class.jmp");
y_values = {"name", "age", "sex", "weight"};
variables_expr = Expr(Variables(X(:height)));
For Each({y_col}, y_values,
	temp_expr = Expr(Y());
	Insert Into(temp_expr, Name Expr(AsColumn(dt, y_col)));
	Insert Into(variables_expr, Name Expr(temp_expr));
);
gb_expr = Expr(Graph Builder(
	Show Control Panel(0)
));
Insert Into(gb_expr, Name Expr(variables_expr));
For Each({y_col, idx}, y_values,
	Eval(EvalExpr(
		Insert Into(gb_expr,
			Name Expr(Elements(Position(1, Expr(idx)), Points(X, Y, Legend(Expr(idx)))))
		)
	));
);
Show(Name Expr(gb_expr));
Eval(gb_expr);&lt;/CODE&gt;&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 17:27:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/700995#M88549</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-20T17:27:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701022#M88555</link>
      <description>&lt;P&gt;Create the graph interactively in JMP&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1700502857244.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58932i695B24D6CBB7F63B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1700502857244.png" alt="jthi_0-1700502857244.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;take the script to your clipboard / script window&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Show Control Panel(0),
	Variables(X(:height), Y(:name), Y(:age), Y(:sex), Y(:weight)),
	Elements(Position(1, 1), Points(X, Y, Legend(1)), Box Plot(X, Y, Legend(5))),
	Elements(Position(1, 2), Points(X, Y, Legend(2)), Box Plot(X, Y, Legend(6))),
	Elements(Position(1, 3), Points(X, Y, Legend(3)), Box Plot(X, Y, Legend(7))),
	Elements(Position(1, 4), Points(X, Y, Legend(4)), Box Plot(X, Y, Legend(8))),
	SendToReport(
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{1, [0], 5, [4, -3], 2, [1], 6, [5, -3], 3, [2], 7, [6, -3], 4, [3],
				8, [7, -3]}
			)}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;See what has to be changed to include BoxPlots when the original graph builder is like this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Show Control Panel(0),
	Variables(X(:height), Y(:name), Y(:age), Y(:sex), Y(:weight)),
	Elements(Position(1, 1), Points(X, Y, Legend(1))),
	Elements(Position(1, 2), Points(X, Y, Legend(2))),
	Elements(Position(1, 3), Points(X, Y, Legend(3))),
	Elements(Position(1, 4), Points(X, Y, Legend(4)))
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Go back to your script and try small modifications. You can fairly easily see, that you are missing something from Elements and based on your original script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Name Expr(Elements(Position(1, Expr(idx)), Points(X, Y, Legend(Expr(idx)))))&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;it seems like you should just try adding the Box Plot in correct format there&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 17:58:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701022#M88555</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-20T17:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701025#M88556</link>
      <description>&lt;P&gt;Run the graph.&lt;/P&gt;
&lt;P&gt;Open the Control Panel&lt;/P&gt;
&lt;P&gt;Add in the box plots you want.&lt;/P&gt;
&lt;P&gt;Close the Control Panel&lt;/P&gt;
&lt;P&gt;Go to the red triangle and select&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Save=&amp;gt;Script to Script Window&lt;/P&gt;
&lt;P&gt;Examine the code, and change the script to add in the additional items that the new script has, that the old script does not.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 18:00:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701025#M88556</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-11-20T18:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701033#M88558</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;I have been doing exactly that, added box plots interactively, then checked the resulting script, made the changes in my original script, still could not get box plots to work.&amp;nbsp;I guess I am still not good at spotting what is missing/need.&lt;/P&gt;&lt;P&gt;Will try&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp; suggestion now.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 18:08:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701033#M88558</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-20T18:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701152#M88572</link>
      <description>&lt;P&gt;Run your JSL, and then modify he graph to how you want it to look, and then save the JSL from the new graph.&amp;nbsp; Add the new JSL to this Discussion Track and I will take a look at it.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 21:50:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701152#M88572</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-11-20T21:50:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701175#M88577</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;The following is close to my actual case.&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);
Clear Log ();

dt = Open("$sample_data\Semiconductor Capability.jmp");

y_values = {"NPN1", "IVP1", "PNP4", "NPN4"};

variables_expr = Expr(Variables(X(:lot_id)));
For Each({y_col}, y_values,
	temp_expr = Expr(Y());
	Insert Into(temp_expr, Name Expr(AsColumn(dt, y_col)));
	Insert Into(variables_expr, Name Expr(temp_expr));
);
gb_expr = Expr(Graph Builder(
	Show Control Panel(0)
));
Insert Into(gb_expr, Name Expr(variables_expr));
For Each({y_col, idx}, y_values,
	Eval(EvalExpr(
		Insert Into(gb_expr,
			Name Expr(Elements(Position(1, Expr(idx)), Points(X, Y, Legend(Expr(idx)))))
		)
	));
);
Show(Name Expr(gb_expr));
Eval(gb_expr); &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;which gives&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1700522918302.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58973i60B90FB43EF0407B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1700522918302.png" alt="Neo_0-1700522918302.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, I would something like the following&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_1-1700523044870.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58974i95997B9B75CBA6E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_1-1700523044870.png" alt="Neo_1-1700523044870.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The JMP generated script for which is&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :lot_id ), Y( :NPN1 ), Y( :IVP1 ), Y( :PNP4 ), Y( :NPN4 ) ),
	Elements(
		Position( 1, 1 ),
		Points( X, Y, Legend( 1 ), Jitter( "None" ) ),
		Box Plot( X, Y, Legend( 5 ), Jitter( "None" ) )
	),
	Elements(
		Position( 1, 2 ),
		Points( X, Y, Legend( 2 ), Jitter( "None" ) ),
		Box Plot( X, Y, Legend( 6 ), Jitter( "None" ) )
	),
	Elements(
		Position( 1, 3 ),
		Points( X, Y, Legend( 3 ), Jitter( "None" ) ),
		Box Plot( X, Y, Legend( 7 ), Jitter( "None" ) )
	),
	Elements(
		Position( 1, 4 ),
		Points( X, Y, Legend( 4 ), Jitter( "None" ) ),
		Box Plot( X, Y, Legend( 8 ), Jitter( "None" ) )
	),
	SendToReport(
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{1, [0], 5, [4, -3], 2, [1], 6, [5, -3], 3, [2], 7, [6, -3], 4, [3],
				8, [7, -3]}
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The question is how to modify the top script in this post to include box plot in addition to points?&lt;/P&gt;&lt;P&gt;Adding Box Plots () just below Points () is not giving me both.&lt;/P&gt;&lt;P&gt;I guess my placement for Box Plots () is incorrect. Need help here.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2023 23:36:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701175#M88577</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-20T23:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701194#M88579</link>
      <description>&lt;P&gt;I think you used default "Box Plot" Outliers.&lt;/P&gt;&lt;P&gt;Are you looking for "Box Plot" Quantile method that connects all points?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="WebDesignesCrow_0-1700532279382.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58977i271ABE658E7F6EBC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="WebDesignesCrow_0-1700532279382.png" alt="WebDesignesCrow_0-1700532279382.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
Size( 1135, 705 ),
Show Control Panel( 0 ),
Variables(
X( :“S-b"n ),
Y( :C),
Color( :“S-b"n )
),
Elements( Box Plot( X, Y, Legend( 4 ), Box Type( "Quantile" ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 02:05:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701194#M88579</guid>
      <dc:creator>WebDesignesCrow</dc:creator>
      <dc:date>2023-11-21T02:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701205#M88580</link>
      <description>&lt;P&gt;Very minor changes were required to produce the graph you want.&lt;/P&gt;
&lt;P&gt;The JSL produced by the initial script that runs the Graph Builder is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :lot_id ), Y( :NPN1 ), Y( :IVP1 ), Y( :PNP4 ), Y( :NPN4 ) ),
	Elements( Position( 1, 1 ), Points( X, Y, Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 2 ) ) ),
	Elements( Position( 1, 3 ), Points( X, Y, Legend( 3 ) ) ),
	Elements( Position( 1, 4 ), Points( X, Y, Legend( 4 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;When one looks at the JSL that created the above Graph Builder code, only 2 sections do the real work.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb_expr = Expr(Graph Builder(
	Show Control Panel(0)
));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Creates the shell for the Graph Builder&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Show Control Panel( 0 ),


);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The JSL&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;variables_expr = Expr(Variables(X(:lot_id)));
For Each({y_col}, y_values,
	temp_expr = Expr(Y());
	Insert Into(temp_expr, Name Expr(AsColumn(dt, y_col)));
	Insert Into(variables_expr, Name Expr(temp_expr));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Generates the code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Variables( X( :lot_id ), Y( :NPN1 ), Y( :IVP1 ), Y( :PNP4 ), Y( :NPN4 ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Then,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Insert Into(gb_expr, Name Expr(variables_expr));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Inserts the Variables( X(.................) JSL into the Graph Builder() code&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :lot_id ), Y( :NPN1 ), Y( :IVP1 ), Y( :PNP4 ), Y( :NPN4 ) )

);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now what needs to be done, is to build&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;&amp;nbsp;   Elements( Position( 1, 1 ), Points( X, Y, Legend( 1 ) ) ),
	Elements( Position( 1, 2 ), Points( X, Y, Legend( 2 ) ) ),
	Elements( Position( 1, 3 ), Points( X, Y, Legend( 3 ) ) ),
	Elements( Position( 1, 4 ), Points( X, Y, Legend( 4 ) ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The JSL that creates these lines of code is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each({y_col, idx}, y_values,
	Eval(EvalExpr(
		Insert Into(gb_expr,
			Name Expr(Elements(Position(1, Expr(idx)), Points(X, Y, Legend(Expr(idx)))))
		)
	));
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It loops through each of the Y values and creates the Elements line one at a time, and inserts it into the Graph Builder() JSL.&lt;/P&gt;
&lt;P&gt;Finally,&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(gb_expr); &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Runs the completed Graph Builder JSL&lt;/P&gt;
&lt;P&gt;So now, what needs to be changed.&lt;/P&gt;
&lt;P&gt;Basically if one looks at what is different between the JSL the original script creates, and the saved JSL from the Graph Builder with the new modifications, in the original script output, the Elements structure is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Elements( Position( 1, 1 ), Points( X, Y, Legend( 1 ) ) )&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Where the Saved code's Elements section has a section for both Points, and Box Plot&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Elements(
		Position( 1, 1 ),
		Points( X, Y, Legend( 1 ), Jitter( "None" ) ),
		Box Plot( X, Y, Legend( 5 ), Jitter( "None" ) )
	)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Therefore, all that needs to be changed is to add this second section to the code that generates the Elements section.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;For Each( {y_col, idx}, y_values,
	Eval(
		Eval Expr(
			Insert Into(
				gb_expr,
				Name Expr(
					Elements(
						Position( 1, Expr( idx ) ),
						Points( X, Y, Legend( Expr( idx ) ), jitter( "None" ) ),
						Box Plot( X, Y, Legend( Expr( N Items( y_values ) + idx ), jitter( "None" ) ) )
					)
				)
			)
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you put all of this together, the new script is&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
Clear Log();

dt = Open( "$sample_data\Semiconductor Capability.jmp" );

y_values = {"NPN1", "IVP1", "PNP4", "NPN4"};

variables_expr = Expr(
	Variables( X( :lot_id ) )
);
For Each( {y_col}, y_values,
	temp_expr = Expr( Y() );
	Insert Into( temp_expr, Name Expr( As Column( dt, y_col ) ) );
	Insert Into( variables_expr, Name Expr( temp_expr ) );
);
gb_expr = Expr(
	Graph Builder( Show Control Panel( 0 ) )
);
Insert Into( gb_expr, Name Expr( variables_expr ) );
For Each( {y_col, idx}, y_values,
	Eval(
		Eval Expr(
			Insert Into(
				gb_expr,
				Name Expr(
					Elements(
						Position( 1, Expr( idx ) ),
						Points( X, Y, Legend( Expr( idx ) ), jitter( "None" ) ),
						Box Plot( X, Y, Legend( Expr( N Items( y_values ) + idx ), jitter( "None" ) ) )
					)
				)
			)
		)
	)
);

Show( Name Expr( gb_expr ) );
Eval( gb_expr );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Nov 2023 04:06:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701205#M88580</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-11-21T04:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701341#M88592</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;I would not have come up with this easily.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Box Plot( X, Y, Legend( Expr( N Items( y_values ) + idx ), jitter( "None" ) ) )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;How do I change the default markers in Points to say a&amp;nbsp; "+" or or a "square". This does not do the trick&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Points( X, Y, Legend( Expr( idx ) ), jitter( "None" ), marker ("square") )&lt;/LI-CODE&gt;&lt;P&gt;Changing the &lt;EM&gt;marker&lt;/EM&gt; interactively shows that I need to direct the marker change via sendToReport () for each Y variable. How to do this all at once for all Y variables?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:20:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701341#M88592</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-21T10:20:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701347#M88593</link>
      <description>&lt;P&gt;Depending on where you do it, where to see what will be different. Here is example if you do it from Legend:&lt;/P&gt;
&lt;P&gt;Change it from legend and you get something like&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;{Legend Model(4, Properties(0, {Marker("Circle")}, Item ID("NPN4", 1)))}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So search for Legend Model from Scripting Index&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1700562526669.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/58985i0DFEF47862D018CA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1700562526669.png" alt="jthi_0-1700562526669.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Get the script from there, modify it to fit your needs but keep it as simple as possible (add second Y-axis) and test it out&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(528, 448),
	Show Control Panel(0),
	Variables(X(:sex), Y(:height), Y(:weight)),
	Elements(Position(1, 1), Points(X, Y, Legend(3))),
	Elements(Position(1, 2), Points(X, Y, Legend(1)))
);

server = gb &amp;lt;&amp;lt; Get Legend Server;
item = server &amp;lt;&amp;lt; Get Legend Item(1, 1);
item &amp;lt;&amp;lt; Set Properties({Marker("Circle")});&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You managed to change markers on one plot. Then you ask: how do I change them on all of the plots? Then explore the script in more detail and it seems like there are some indices provided&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;item = server &amp;lt;&amp;lt; Get Legend Item(1, 1);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;check &amp;lt;&amp;lt; Get Legend item from scripting index and hope that it is there and if it isn't explore other legend related objects and hope they work in similar manner (or just try to send messages to the server &amp;lt;&amp;lt; get lege Ctrl+Space here).&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;server &amp;lt;&amp;lt; Get Legend Items;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;{{LegendModelItem(Label("height"), Type("Marker"))},
{LegendModelItem(Label("weight"), Type("Marker"))}}&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Now you have a list of legend items. Try looping over that list and see what happens&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(528, 448),
	Show Control Panel(0),
	Variables(X(:sex), Y(:height), Y(:weight)),
	Elements(Position(1, 1), Points(X, Y, Legend(3))),
	Elements(Position(1, 2), Points(X, Y, Legend(1)))
);

server = gb &amp;lt;&amp;lt; Get Legend Server;
For Each({item}, server &amp;lt;&amp;lt; Get Legend Items,
	item &amp;lt;&amp;lt; Set Properties({Marker("Circle")});	
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Easier option is to set the markers as row states to your data table if that works for you.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 10:38:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701347#M88593</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-21T10:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701371#M88595</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;Thanks. Is there a way to change the markers when the Points are plotted first rather than getting a handle to the legend server later and then changing the markers for each Y variable?&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:21:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701371#M88595</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-21T11:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701372#M88596</link>
      <description>&lt;P&gt;Is there a reason why they couldn't be changed after?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You could use SendToReport and build the Legend model inside Dispatch part with similar ideas as other parts in your script have been built.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:44:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701372#M88596</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-21T11:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701373#M88597</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;Sure things could be changed after. Changing markers while the points are being plotted seemed like a simpler route to me.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 11:52:29 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701373#M88597</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-21T11:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701397#M88600</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;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;In the main script below, I have added Local Data Filter () under Eval() which works as intended&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval( gb_expr &amp;lt;&amp;lt;Local Data Filter( Add Filter( columns( :SITE ), Where( :SITE == {2, 3, 4} ) ) ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but if I add add the script for updating the markers&amp;nbsp;the chart gets plotted twice!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Eval(
	server = gb_expr &amp;lt;&amp;lt; Get Legend Server;
	For Each( {item}, server &amp;lt;&amp;lt; Get Legend Items, item &amp;lt;&amp;lt; Set Properties( {Marker( "Circle" )} ) );
);&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&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 );
Clear Log();

dt = Open( "$sample_data\Semiconductor Capability.jmp" );

y_values = {"NPN1", "IVP1", "PNP4", "NPN4"};

variables_expr = Expr(
	Variables( X( :lot_id ) )
);
For Each( {y_col}, y_values,
	temp_expr = Expr( Y() );
	Insert Into( temp_expr, Name Expr( As Column( dt, y_col ) ) );
	Insert Into( variables_expr, Name Expr( temp_expr ) );
);
gb_expr = Expr(
	Graph Builder( Show Control Panel( 0 ) )
);
Insert Into( gb_expr, Name Expr( variables_expr ) );
For Each( {y_col, idx}, y_values,
	Eval(
		Eval Expr(
			Insert Into(
				gb_expr,
				Name Expr(
					Elements(
						Position( 1, Expr( idx ) ),
						Points( X, Y, Legend( Expr( idx ) ), jitter( "None" ) ),
						Box Plot( X, Y, Legend( Expr( N Items( y_values ) + idx ), jitter( "None" ) ) )
					)
				)
			)
		)
	)
);

//Show( Name Expr( gb_expr ) );
Eval( gb_expr &amp;lt;&amp;lt;Local Data Filter( Add Filter( columns( :SITE ), Where( :SITE == {2, 3, 4} ) ) ) );

Eval(
	server = gb_expr &amp;lt;&amp;lt; Get Legend Server;
	For Each( {item}, server &amp;lt;&amp;lt; Get Legend Items, item &amp;lt;&amp;lt; Set Properties( {Marker( "Circle" )} ) );
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The second chart is with the updated markers.&lt;/P&gt;&lt;P&gt;How to plot a single chart with the updated markers together the local data filter?&lt;/P&gt;&lt;P&gt;I guess, I am unable to place the the last piece for marker change correctly where I request some help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Nov 2023 13:36:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701397#M88600</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2023-11-21T13:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to add box plots to points when supplied Y variables as list to graph builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701534#M88612</link>
      <description>&lt;P&gt;You don't want to run gb_expr twice. You want to get the reference you get from gb_expr and send those messages to it&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb = Eval( gb_expr );
gb &amp;lt;&amp;lt; Local data Filter(...)
server = gb &amp;lt;&amp;lt; get legend server;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Nov 2023 17:51:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-box-plots-to-points-when-supplied-Y-variables-as-list/m-p/701534#M88612</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2023-11-21T17:51:59Z</dc:date>
    </item>
  </channel>
</rss>

