<?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 Hiding Legend Items in Graph Builder using JSL in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/222143#M44327</link>
    <description>&lt;P&gt;I am having an annoying issue with the Graph Builder in JSL.&amp;nbsp; In order to show both the points and a smoother on a scatter plot I am changing the trasnparency of the points.&amp;nbsp; I can make this work well enough but when I manipulate the plot later in JSL the points are being added back to the legend by default instead of staying hidden I assume because JMP thinks they are no longer redundant.&amp;nbsp; I know manually in the graph builder you can uncheck items that you don't want to display but is there a way to do this in JSL?&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="Capture.PNG" style="width: 77px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18876i529748DC606F0023/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 311px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18877i123263654883AA57/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 16 Aug 2019 22:11:32 GMT</pubDate>
    <dc:creator>jjswan33</dc:creator>
    <dc:date>2019-08-16T22:11:32Z</dc:date>
    <item>
      <title>Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/222143#M44327</link>
      <description>&lt;P&gt;I am having an annoying issue with the Graph Builder in JSL.&amp;nbsp; In order to show both the points and a smoother on a scatter plot I am changing the trasnparency of the points.&amp;nbsp; I can make this work well enough but when I manipulate the plot later in JSL the points are being added back to the legend by default instead of staying hidden I assume because JMP thinks they are no longer redundant.&amp;nbsp; I know manually in the graph builder you can uncheck items that you don't want to display but is there a way to do this in JSL?&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="Capture.PNG" style="width: 77px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18876i529748DC606F0023/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.PNG" style="width: 311px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/18877i123263654883AA57/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.PNG" alt="Capture2.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2019 22:11:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/222143#M44327</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-08-16T22:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/224479#M44619</link>
      <description>&lt;P&gt;I guess there is no JSL solution for this.&amp;nbsp; If that is the case there very much should be.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2019 18:19:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/224479#M44619</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-09-03T18:19:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229785#M45612</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am currently facing the same problem: hiding a part of the Graph Builder legend using JSL.&lt;/P&gt;&lt;P&gt;I think the options "Legend" or "Legend position" could help but I have difficulties to fully understand how it works, in particular if we do not know the number of groups.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance I want to create this kind of graph using the Big Class table, and I do not want to display the point items in the legend:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph Builder.png" style="width: 625px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19786i1C6C66D8286AB8F0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Graph Builder.png" alt="Graph Builder.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The corresponding script is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 528, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ), Color( :age ) ),
	Elements( Box Plot( X, Y, Legend( 4 ) ), Points( X, Y, Legend( 5 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{4, [0, 1, 2, 3, 4, 5, 6, -3], 5, [-1, -1, -1, -1, -1, -1]}
			), Position( {0, 1, 2, 3, 4, 5, 6, -3, -1, -1, -1, -1, -1, -1} )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way to generalize the process without knowing the number of levels for the age variable?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any input would be appreciated :)&lt;/img&gt; Thanks&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 12:33:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229785#M45612</guid>
      <dc:creator>anne_sa</dc:creator>
      <dc:date>2019-10-21T12:33:21Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229830#M45620</link>
      <description>&lt;P&gt;You can use the Show Legend element to control the showing or hiding of the Legend.&amp;nbsp; Here is the entry from the Scripting Index showing it&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp; Help==&amp;gt;Scripting Index&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="showlegend.PNG" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19790iC4CB8E0CCD30DFF4/image-size/large?v=v2&amp;amp;px=999" role="button" title="showlegend.PNG" alt="showlegend.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;You can also delete the entire Legend component by deleting it using the Display Tree capabilites in JMP&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb = Graph Builder(
	Size( 528, 450 ),
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ), Color( :age ) ),
	Elements( Box Plot( X, Y))
);
report(gb)[LegendBox(1)]&amp;lt;&amp;lt;delete;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 14:38:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229830#M45620</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-10-21T14:38:24Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229836#M45621</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your reply.&lt;/P&gt;&lt;P&gt;However I do not want to completely hide or delete the legend but just a part of it.&lt;/P&gt;&lt;P&gt;By default I have the following graph:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph Builder1.png" style="width: 506px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19791iE8AB0B0EA62BAEA4/image-dimensions/506x370?v=v2" width="506" height="370" role="button" title="Graph Builder1.png" alt="Graph Builder1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And I would like to hide only the point items in the legend to get that one:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph Builder.png" style="width: 492px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19792iC40D7D6CD1F0710B/image-dimensions/492x360?v=v2" width="492" height="360" role="button" title="Graph Builder.png" alt="Graph Builder.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently "-1" in the legend position option means "hide this item" but I do not see how to easily use this option without prior information about the graph.&lt;/P&gt;&lt;P&gt;I hope it is clearer.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 15:02:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229836#M45621</guid>
      <dc:creator>anne_sa</dc:creator>
      <dc:date>2019-10-21T15:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229856#M45623</link>
      <description>&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;What version of JMP are you using, and on which operating system.&amp;nbsp; Using the JSL you provided, I can not get results like you are specifying.&amp;nbsp; For JMP 15 I get &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pic15.PNG" style="width: 623px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19794iAC510C1D740A718E/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic15.PNG" alt="pic15.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;In JMP 13 and JMP 14 I get:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pic1314.PNG" style="width: 622px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19795i2318ED689831E509/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic1314.PNG" alt="pic1314.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;In JMP 11 and JMP 12, I get:&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pic1112.PNG" style="width: 618px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19796i576BEB4A7BCBD760/image-size/large?v=v2&amp;amp;px=999" role="button" title="pic1112.PNG" alt="pic1112.PNG" /&gt;&lt;/span&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT style="background-color: #ffffff;"&gt;But I can not get the graph you present with the different markers, and both the points and the rectangular marking in the legend.&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Oct 2019 16:14:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229856#M45623</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-10-21T16:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229857#M45624</link>
      <description>&lt;P&gt;I personally get the dual legends in both JMP 12 and JMP 14.&amp;nbsp; I didn't post my code earlier but below is the function I use to make the plots where I have the issue.&amp;nbsp; In my case I believe what is happening is that as soon as I use the bit of code to set the transparency of the points that JMP no longer thinks the points legend item is redundant and displays the result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RadPlotCreator1X1YGroup = Function({dt, XCol, YCol, OverlayCol, GroupXCol, GroupYCol}, {Default Local},
	
	gb =  dt &amp;lt;&amp;lt; Graph Builder(
		Size( 849, 622 ),
		Fit to Window( "Off" ),
		Show Control Panel(0),
		Grid Color( "Black" ),
		Variables(
			X( XCol ),
			Y( YCol ),
			Group X( GroupXCol ),
			Group Y( GroupYCol ),
			Overlay( OverlayCol )
		),
		Elements(Points(X, Y, Legend(3)), Smoother( X, Y, Legend( 9 ) )),
		SendToReport(
			Dispatch(
				{},
				"",
				ScaleBox,
				{}
			),
			Dispatch(
				{},
				"",
				ScaleBox,
				{}
			)
		)
	);

	summarize(unique_values=by(OverlayCol));
	NSplits = N Items (unique_values);
	sb = report(gb)[ScaleBox(5)];
	For(i=0, i &amp;lt; NSplits, i+=1,
		sb &amp;lt;&amp;lt; Legend Model(3, Properties(i, {Transparency(0.2)}));
	);

	frame_list = gb &amp;lt;&amp;lt; xpath("//FrameBox");
	num_frames = N Items (frame_list);


	For(i=1, i &amp;lt;= num_frames, i+=1,
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Background Color(White);
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Grid Line Order( Back );
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Reference Line Order( Back );
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Frame Size(250, 250);
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; X Axis(0, 150, Inc(20), Minor Ticks(1),
				Add Ref Line( 70, Solid, "Black", "", 2 ), 
				Add Ref Line( 120, Solid, "Black", "", 2 ), 
				Add Ref Line( 135, Solid, "Black", "", 2 ), Show Major Grid( 1 ));
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Y Axis(Minor Ticks(1));
	);

	gbp = Report( gb );
	img = gbp &amp;lt;&amp;lt; getpicture();
	
	return(img);
	
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Oct 2019 16:29:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229857#M45624</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-10-21T16:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229994#M45637</link>
      <description>&lt;P&gt;Ooops wrong copy / paste sorry for the confusion!&lt;/P&gt;&lt;P&gt;Let's redo it (using JMP15)!&lt;/P&gt;&lt;P&gt;First I have the following graph:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph Builder2.png" style="width: 372px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19814i506E92BD4448D169/image-dimensions/372x272?v=v2" width="372" height="272" role="button" title="Graph Builder2.png" alt="Graph Builder2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And the corresponding script is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Variables( X( :age ), Y( :height ), Color( :age ) ),
	Elements( Points( X, Y, Legend( 6 ) ), Box Plot( X, Y, Legend( 7 ) ) )
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Manually I modify the legend and deselect items associated with the points:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Image1.png" style="width: 254px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19817iC44FFF5A330C9348/image-dimensions/254x334?v=v2" width="254" height="334" role="button" title="Image1.png" alt="Image1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I get this graph:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Graph Builder3.png" style="width: 410px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19816i30F66192078E119E/image-dimensions/410x300?v=v2" width="410" height="300" role="button" title="Graph Builder3.png" alt="Graph Builder3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And the updated script is:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Variables( X( :age ), Y( :height ), Color( :age ) ),
	Elements( Points( X, Y, Legend( 6 ) ), Box Plot( X, Y, Legend( 7 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position(
				{6, [-1, -1, -1, -1, -1, -1], 7, [0, 1, 2, 3, 4, 5, 6, -3]}
			), Position( {-1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, -3} )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there an easy way to manage this second step with JSL?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 06:47:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229994#M45637</guid>
      <dc:creator>anne_sa</dc:creator>
      <dc:date>2019-10-22T06:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229997#M45638</link>
      <description>&lt;P&gt;Here is the brute force way that I use to solve these kind of issues.&amp;nbsp; I simply build the JSL code required and then run the JSL I created. Please note that in the Big Class data table I used, I added an additional Age Group, of 18.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Current Data Table();

// Find the number of Age groups
Summarize( dt, ageGroups = by( :age ) );

// Build the JSL
theExpr =
"Graph Builder(
	Show Control Panel( 0 ),
	Variables( X( :age ), Y( :height ), Color( :age ) ),
	Elements( Points( X, Y, Legend( 6 ) ), Box Plot( X, Y, Legend( 7 ) ) ),
	SendToReport(
		Dispatch(
			{},
			\!"400\!",
			LegendBox,
			{Legend Position(
				{6, [ -1";

For( i = 2, i &amp;lt;= N Items( ageGroups ), i++,
	theExpr = theExpr || ", -1"
);

theExpr = theExpr || "], 7, [0";

For( i = 1, i &amp;lt;= N Items( ageGroups ), i++,
	theExpr = theExpr || ", " || Char( i )
);

theExpr = theExpr || ", -3]}
	), Position( {-1";
	
For( i = 2, i &amp;lt;= N Items( ageGroups ), i++,
	theExpr = theExpr || ", -1"
);

For( i = 0, i &amp;lt;= N Items( ageGroups ), i++,
	theExpr = theExpr || ", " || Char( i )
);

theExpr = theExpr || ", -3]} ) } )));";

// Execute the JSL string
eval(parse(theExpr));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="builtgb.PNG" style="width: 663px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19818iD6B7DCA68212664E/image-size/large?v=v2&amp;amp;px=999" role="button" title="builtgb.PNG" alt="builtgb.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Oct 2019 08:50:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/229997#M45638</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2019-10-22T08:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/230465#M45705</link>
      <description>&lt;P&gt;I found an alternate solution that in my view is cleaner then Jim's brute force method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Instead I am defining two lists at the beginning of my function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;	p = {};
	l = {};
	summarize(unique_values=by(OverlayCol));
	NSplits = N Items (unique_values);
	
	For(i=0, i &amp;lt; NSplits, i+=1,
		p = Insert(p, -1);
		l = Insert(l, i);
	);
	pl = Insert(p, l);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;to create the two lists needed for the points and lines (in my case) legend items then passing those lists as matrices that into the graph builder dispatch as follows:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;			Dispatch(
				{},
				"400",
				LegendBox,
				{Legend Position( {3, Matrix(p), 9, Matrix(l)} ), 
				Position( Matrix(pl))}
			)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Full version of the updated function:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;RadPlotCreator1XGroupTest = Function({dt, XCol, YCol, OverlayCol, GroupXCol}, {Default Local},
	
	p = {};
	l = {};
	summarize(unique_values=by(OverlayCol));
	NSplits = N Items (unique_values);
	
	For(i=0, i &amp;lt; NSplits, i+=1,
		p = Insert(p, -1);
		l = Insert(l, i);
	);
	pl = Insert(p, l);
	
	
	gb =  dt &amp;lt;&amp;lt; Graph Builder(
		Size( 849, 622 ),
		Fit to Window( "Off" ),
		Show Control Panel(0),
		Grid Color( "Black" ),
		Variables(
			X( XCol ),
			Y( YCol ),
			Group X( GroupXCol ),
			Overlay( OverlayCol )
		),
		Elements(Points(X, Y, Legend(3)), Smoother( X, Y, Legend( 9 ) )),
		SendToReport(
			Dispatch(
				{},
				"",
				ScaleBox,
				{}
			),
			Dispatch(
				{},
				"",
				ScaleBox,
				{}
			),
			Dispatch(
				{},
				"400",
				LegendBox,
				{Legend Position( {3, Matrix(p), 9, Matrix(l)} ), 
				Position( Matrix(pl))}
			)
		)
	);


	sb = report(gb)[ScaleBox(5)];
	For(i=0, i &amp;lt; NSplits, i+=1,
		sb &amp;lt;&amp;lt; Legend Model(3, Properties(i, {Transparency(0.2)}));
	);

	frame_list = gb &amp;lt;&amp;lt; xpath("//FrameBox");
	num_frames = N Items (frame_list);


	For(i=1, i &amp;lt;= num_frames, i+=1,
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Background Color(White);
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Grid Line Order( Back );
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Reference Line Order( Back );
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Frame Size(250, 250);
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; X Axis(0, 150, Inc(20), Minor Ticks(1),
				Add Ref Line( 70, Solid, "Black", "", 2 ), 
				Add Ref Line( 120, Solid, "Black", "", 2 ), 
				Add Ref Line( 135, Solid, "Black", "", 2 ), Show Major Grid( 1 ));
			Report(gb)[Framebox(i)] &amp;lt;&amp;lt; Y Axis(Minor Ticks(1));
	);

	gbp = Report( gb );
	img = gbp &amp;lt;&amp;lt; getpicture();
	
	return(img);
	
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Oct 2019 23:13:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/230465#M45705</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-10-23T23:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/230498#M45712</link>
      <description>&lt;P&gt;Thanks &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt; and &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/11453"&gt;@jjswan33&lt;/a&gt; for your answers!&lt;/P&gt;&lt;P&gt;I need to slightly adapt it to make it match with my script but I think I will work.&lt;/P&gt;&lt;P&gt;Thanks again :)&lt;/img&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 07:00:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/230498#M45712</guid>
      <dc:creator>anne_sa</dc:creator>
      <dc:date>2019-10-24T07:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: Hiding Legend Items in Graph Builder using JSL</title>
      <link>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/230577#M45729</link>
      <description>&lt;P&gt;And thank you &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/750"&gt;@anne_sa&lt;/a&gt;.&amp;nbsp; Your info pointed me in the right direction.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2019 15:49:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Hiding-Legend-Items-in-Graph-Builder-using-JSL/m-p/230577#M45729</guid>
      <dc:creator>jjswan33</dc:creator>
      <dc:date>2019-10-24T15:49:04Z</dc:date>
    </item>
  </channel>
</rss>

