<?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: Graph Builder y=x Line Not Tied to Specific Graph in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780412#M96245</link>
    <description>&lt;P&gt;This method should allow you to do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = 
// Open Data Table: Restaurant Tips.jmp
// → Data Table( "Restaurant Tips" )
Open( "$SAMPLE_DATA/Restaurant Tips.jmp" );

Graph Builder(
	Graph Spacing( 10 ),
	Spacing Borders( 1 ),
	Variables( X( :Bill Amount ), Y( :Tip Amount ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch( {}, "Tip Amount", ScaleBox,
			{Min( -0.062875 ), Max( 72.9215829464286 ), Inc( 10 ), Minor Ticks( 1 )}
		)
	)
);

rpt = Current Report();
rpt[framebox( 1 )] &amp;lt;&amp;lt; Add Graphics Script(
	2,
	Description( "" ),
	Pen Color( "red" );
	Y Function( x, x );
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1723149033069.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66984i94B578A33DC5B82C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1723149033069.png" alt="txnelson_0-1723149033069.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Aug 2024 20:30:44 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2024-08-08T20:30:44Z</dc:date>
    <item>
      <title>Graph Builder y=x Line Not Tied to Specific Graph</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780399#M96242</link>
      <description>&lt;P&gt;I am trying to work in Graph Builder to create a line with JSL of perfect correlation (y=x) for the scatterplot. See below using Restaurant Tips sample data as an example.&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="scott1588_0-1723148025895.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66983i54FFD2C48F070025/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott1588_0-1723148025895.png" alt="scott1588_0-1723148025895.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I do this manually, here is the script that JMP generates:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Graph Spacing( 10 ),
	Spacing Borders( 1 ),
	Variables( X( :Bill Amount ), Y( :Tip Amount ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch( {}, "Tip Amount", ScaleBox,
			{Min( -0.062875 ), Max( 72.9215829464286 ), Inc( 10 ), Minor Ticks( 1 )}
		),
		Dispatch( {}, "Graph Builder", FrameBox,
			{Add Graphics Script(
				2,
				Description( "" ),
				Pen Color( "red" );
				Y Function( x, x );
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;Note that this is tied to this specific graph.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can a make this universal to apply to any graph builder chart I am working on? My ultimate goal is to make this an add-in or better yet a button on graph builder (if that is possible) to draw this line for any chart I am working on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is an old video and some old info in the Community on this, but all of it that I could find is tied to a specific chart. I think maybe I don't understand frame box very well. I tried some scripting variations using frame box but got nowhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks as always for any help.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 20:21:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780399#M96242</guid>
      <dc:creator>scott1588</dc:creator>
      <dc:date>2024-08-08T20:21:52Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder y=x Line Not Tied to Specific Graph</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780409#M96243</link>
      <description>&lt;P&gt;My specific application is that I often have to compare data from redundant sensors which ideally should be providing perfectly redundant data. Of course, reality intervenes and this is often not the case. So a scatterplot with the y=x line is my quick way to evaluate the data from the two sensors.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 20:25:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780409#M96243</guid>
      <dc:creator>scott1588</dc:creator>
      <dc:date>2024-08-08T20:25:52Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder y=x Line Not Tied to Specific Graph</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780410#M96244</link>
      <description>&lt;P&gt;great idea - I use it sooo often!&lt;BR /&gt;-&amp;gt; I will add it to&amp;nbsp;&lt;LI-MESSAGE title="Graph Builder Toolbar" uid="565466" url="https://community.jmp.com/t5/JMP-Add-Ins/Graph-Builder-Toolbar/m-p/565466#U565466" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;: )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;fbs = current report() &amp;lt;&amp;lt; xpath("//FrameBox");
fbs &amp;lt;&amp;lt; Add Graphics Script(
				Pen Color( "gray" );
				Y Function( x, x );
			)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 20:28:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780410#M96244</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-08-08T20:28:16Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder y=x Line Not Tied to Specific Graph</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780412#M96245</link>
      <description>&lt;P&gt;This method should allow you to do what you want&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = 
// Open Data Table: Restaurant Tips.jmp
// → Data Table( "Restaurant Tips" )
Open( "$SAMPLE_DATA/Restaurant Tips.jmp" );

Graph Builder(
	Graph Spacing( 10 ),
	Spacing Borders( 1 ),
	Variables( X( :Bill Amount ), Y( :Tip Amount ) ),
	Elements( Points( X, Y, Legend( 3 ) ) ),
	SendToReport(
		Dispatch( {}, "Tip Amount", ScaleBox,
			{Min( -0.062875 ), Max( 72.9215829464286 ), Inc( 10 ), Minor Ticks( 1 )}
		)
	)
);

rpt = Current Report();
rpt[framebox( 1 )] &amp;lt;&amp;lt; Add Graphics Script(
	2,
	Description( "" ),
	Pen Color( "red" );
	Y Function( x, x );
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1723149033069.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66984i94B578A33DC5B82C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1723149033069.png" alt="txnelson_0-1723149033069.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 20:30:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780412#M96245</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-08-08T20:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder y=x Line Not Tied to Specific Graph</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780429#M96248</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;. Once again you guys have come to the rescue.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;Unfortunately I work on a Mac and it doesn't look like your add-in works on a Mac. It's too bad. It looks great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/2687"&gt;@txnelson&lt;/a&gt;&amp;nbsp;(or actually either of you...) I have a question about the Add Graphics Script command you used which is the same syntax as the generated JMP script. If it doesn't get too far into the weeds, what is the purpose of the 2 argument? The documentation on the Add Graphics Script command is very sketchy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Aug 2024 22:04:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780429#M96248</guid>
      <dc:creator>scott1588</dc:creator>
      <dc:date>2024-08-08T22:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder y=x Line Not Tied to Specific Graph</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780459#M96256</link>
      <description>&lt;P&gt;It is the position of the script, so you can force the order in which they are drawn&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(
	Variables(X(:weight), Y(:height), Overlay(:sex)),
	Elements(Points(X, Y, Legend(9)), Line Of Fit(X, Y, Legend(11)))
);

Report(gb)[FrameBox(1)] &amp;lt;&amp;lt; Add Graphics Script(
	1,
	Fill Color("Red");
	Circle(
		20,
		{20, 20},
		{50, 50},
		{70, 80},
		"FILL"
	)
);

Report(gb)[FrameBox(1)] &amp;lt;&amp;lt; Add Graphics Script(
	2,
	Circle(
		20,
		{40, 20},
		{40, 50},
		{40, 80},
		"FILL"
	)
);

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Like you see in customize menu&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1723177250263.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/66989i9255783AD3A8DBA0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1723177250263.png" alt="jthi_0-1723177250263.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Edit:&amp;nbsp;&lt;A href="https://www.jmp.com/support/help/en/18.0/#page/jmp/specify-the-order-of-graphical-elements.shtml#" target="_blank"&gt;Specify the Order of Graphical Elements (jmp.com)&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 04:23:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/780459#M96256</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-08-09T04:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder y=x Line Not Tied to Specific Graph</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/794681#M97145</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;great idea - I use it sooo often!&lt;BR /&gt;-&amp;gt; I will add it to&amp;nbsp;&lt;LI-MESSAGE title="Graph Builder Toolbar" uid="565466" url="https://community.jmp.com/t5/JMP-Add-Ins/Graph-Builder-Toolbar/m-p/565466#U565466" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&amp;nbsp;: )&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;available now:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1725395433421.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/67859i3A3E1788AB24C89F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1725395433421.png" alt="hogi_0-1725395433421.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Sep 2024 20:30:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-y-x-Line-Not-Tied-to-Specific-Graph/m-p/794681#M97145</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-09-03T20:30:42Z</dc:date>
    </item>
  </channel>
</rss>

