<?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 Is it possible to script Graph Builder to bring reference lines to the front in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960626#M110208</link>
    <description>&lt;P&gt;Is there way through JSL to move reference lines to the front of the plot so that they are clearly visible over the datapoints?&lt;BR /&gt;I know I can right-click, customize on within individual frame boxes and manually reorder the items in the list, but i'd like to do this via JSL if possible.&lt;BR /&gt;&lt;BR /&gt;Appreciate any suggestions/feedback you might have.&amp;nbsp;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ray&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rbfinner_2-1784647117397.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/110573iDFB587C9F7D8490D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rbfinner_2-1784647117397.png" alt="rbfinner_2-1784647117397.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code to replicate the graph above.&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);&lt;BR /&gt;dt = open ( "$SAMPLE_DATA/Aircraft Incidents.jmp" );&lt;BR /&gt;dt &amp;lt;&amp;lt; Graph Builder(
	Size( 964, 585 ),
	Show Control Panel( 0 ),
	Graph Spacing( 3 ),
	Spacing Borders( 1 ),
	Variables( X( :Event Date ), X( :Amateur Built ), Y( :Latitude ) ),
	Elements(
		Position( 1, 1 ),
		Points( X, Y, Legend( 94 ) ),
		Smoother( X, Y, Legend( 95 ) )
	),
	Elements(
		Position( 2, 1 ),
		Points( X, Y, Legend( 96 ) ),
		Box Plot( X, Y, Legend( 97 ), Outliers( 0 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"Latitude",
			ScaleBox,
			{Min( 0 ), Max( 110.494221427167 ), Inc( 20 ), Minor Ticks( 3 ),
			Add Ref Line( 42.1037140060617, "Solid", "Red", "", 1 )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Marker Size( 4 ), Marker Drawing Mode( "Outlined" )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox( 2 ),
			{Marker Size( 4 ), Marker Drawing Mode( "Outlined" )}
		)
	)
)&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, 21 Jul 2026 15:25:49 GMT</pubDate>
    <dc:creator>rbfinner</dc:creator>
    <dc:date>2026-07-21T15:25:49Z</dc:date>
    <item>
      <title>Is it possible to script Graph Builder to bring reference lines to the front</title>
      <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960626#M110208</link>
      <description>&lt;P&gt;Is there way through JSL to move reference lines to the front of the plot so that they are clearly visible over the datapoints?&lt;BR /&gt;I know I can right-click, customize on within individual frame boxes and manually reorder the items in the list, but i'd like to do this via JSL if possible.&lt;BR /&gt;&lt;BR /&gt;Appreciate any suggestions/feedback you might have.&amp;nbsp;&lt;BR /&gt;Thanks,&lt;BR /&gt;Ray&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rbfinner_2-1784647117397.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/110573iDFB587C9F7D8490D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rbfinner_2-1784647117397.png" alt="rbfinner_2-1784647117397.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Code to replicate the graph above.&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);&lt;BR /&gt;dt = open ( "$SAMPLE_DATA/Aircraft Incidents.jmp" );&lt;BR /&gt;dt &amp;lt;&amp;lt; Graph Builder(
	Size( 964, 585 ),
	Show Control Panel( 0 ),
	Graph Spacing( 3 ),
	Spacing Borders( 1 ),
	Variables( X( :Event Date ), X( :Amateur Built ), Y( :Latitude ) ),
	Elements(
		Position( 1, 1 ),
		Points( X, Y, Legend( 94 ) ),
		Smoother( X, Y, Legend( 95 ) )
	),
	Elements(
		Position( 2, 1 ),
		Points( X, Y, Legend( 96 ) ),
		Box Plot( X, Y, Legend( 97 ), Outliers( 0 ) )
	),
	SendToReport(
		Dispatch(
			{},
			"Latitude",
			ScaleBox,
			{Min( 0 ), Max( 110.494221427167 ), Inc( 20 ), Minor Ticks( 3 ),
			Add Ref Line( 42.1037140060617, "Solid", "Red", "", 1 )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox,
			{Marker Size( 4 ), Marker Drawing Mode( "Outlined" )}
		),
		Dispatch(
			{},
			"Graph Builder",
			FrameBox( 2 ),
			{Marker Size( 4 ), Marker Drawing Mode( "Outlined" )}
		)
	)
)&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, 21 Jul 2026 15:25:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960626#M110208</guid>
      <dc:creator>rbfinner</dc:creator>
      <dc:date>2026-07-21T15:25:49Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to script Graph Builder to bring reference lines to the front</title>
      <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960641#M110209</link>
      <description>&lt;P&gt;If you change the order within customize graph, JMP will add&amp;nbsp;&lt;STRONG&gt;Reference Line Order&lt;/STRONG&gt; to your script (at least in JMP19). You can then search that from Scripting Index to get an idea what you could possibly do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2026 16:03:20 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960641#M110209</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-07-21T16:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to script Graph Builder to bring reference lines to the front</title>
      <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960642#M110210</link>
      <description>&lt;P&gt;Does this modified script work?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 964, 585 ),
	Show Control Panel( 0 ),
	Graph Spacing( 3 ),
	Spacing Borders( 1 ),
	Variables( X( :Event Date ), X( :Amateur Built ), Y( :Latitude ) ),
	Elements(
		Position( 1, 1 ),
		Points( X, Y, Legend( 94 ) ),
		Smoother( X, Y, Legend( 95 ) )
	),
	Elements(
		Position( 2, 1 ),
		Points( X, Y, Legend( 96 ) ),
		Box Plot( X, Y, Legend( 97 ), Outliers( 0 ) )
	),
	SendToReport(
		Dispatch( {}, "Latitude", ScaleBox,
			{Min( 0 ), Max( 110.494221427167 ), Inc( 20 ), Minor Ticks( 3 ),
			Add Ref Line( 42.1037140060617, "Solid", "Red", "", 1 )}
		),
		Dispatch( {}, "Graph Builder", FrameBox,
			{Marker Size( 4 ), Marker Drawing Mode( "Outlined" ),
			Reference Line Order( 3 )}
		),
		Dispatch( {}, "Graph Builder", FrameBox( 2 ),
			{Marker Size( 4 ), Marker Drawing Mode( "Outlined" ),
			Reference Line Order( 3 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If so, I simply clicked the Red Triangle at the top of GB and select Save Script &amp;gt; To Clipboard after interactively changing the rendering order so the Reference Lines followed the Markers.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2026 16:04:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960642#M110210</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2026-07-21T16:04:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to script Graph Builder to bring reference lines to the front</title>
      <link>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960848#M110219</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;&amp;amp;&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp;- Thank you both. &lt;BR /&gt;Those answers led me to this&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;r = current report();

frameBoxList = r &amp;lt;&amp;lt; XPath( "//FrameBox" );

// Giving a large enough number as input to Reference Line Order( ) 
// to ensure reference lines are brought to the front. 
frameBoxList &amp;lt;&amp;lt; Reference Line Order( 100 );

// Or alternatively, I found seg count() which returns the number &lt;BR /&gt;// of segs in a frame so could use that to set specific count for each one if needed. 
frameBoxList[1] &amp;lt;&amp;lt; seg count();
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Jul 2026 18:37:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Is-it-possible-to-script-Graph-Builder-to-bring-reference-lines/m-p/960848#M110219</guid>
      <dc:creator>rbfinner</dc:creator>
      <dc:date>2026-07-22T18:37:53Z</dc:date>
    </item>
  </channel>
</rss>

