<?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 JSL for Line of Fit &amp;gt;&amp;gt; Save Formula in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-for-Line-of-Fit-gt-gt-Save-Formula/m-p/536621#M75860</link>
    <description>&lt;P&gt;I am creating a JMP app for users to analyze data without much knowlege of JMP or interaction with the platform.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Graph Builder plot with a Line of Fit. When I right click on the plot, hover over Line of Fit, and select Save Formula, it saves the formula I want to the my data table so that I can continue analysis. I am unable to find a JSL function to do this to add to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the section of my code I wish to run this action. I used the command &lt;CODE class=" language-jsl"&gt;{Save Predicteds} &lt;/CODE&gt;&amp;nbsp;among other possible solutions but it didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 1057, 898 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Fit to Window,
		Variables(
			X( :"V1 Forward_PN(1)"n ),
			Y( :"I1 Forward_PN(1)"n ),
			Overlay( :Test Count )
			),
		Elements(
			Line Of Fit(
			X,
			Y,
			Legend( 29 ),
			Response Axis( "X" ),
			Confidence of Fit( 0 ),
			Equation( 1 ),
			{Save Predicteds} 
			)
		),
		Local Data Filter(
			Close Outline( 1 ),
			Add Filter(
				columns( :"I1 Forward_PN(1)"n, :Forward_Indicator ),
				Where(
					:"I1 Forward_PN(1)"n &amp;gt;= 0.003 &amp;amp; :"I1 Forward_PN(1)"n &amp;lt;= 0.00800009
				),
				Where( :Forward_Indicator == 1 )
			)
		),
		SendToReport(
			Dispatch( {}, "graph title", TextEditBox, {Set Text( "On Voltage" )} )
		)
	)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I believe there is a way to do this since there seems to be commands for everything. For example, if you want to clear row states, you can either go to the menu, click Rows and then click Clear Row states, or you can make a button that runs the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Clear Row States; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;</description>
    <pubDate>Sat, 10 Jun 2023 23:53:30 GMT</pubDate>
    <dc:creator>trevorphysics</dc:creator>
    <dc:date>2023-06-10T23:53:30Z</dc:date>
    <item>
      <title>JSL for Line of Fit &gt;&gt; Save Formula</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-Line-of-Fit-gt-gt-Save-Formula/m-p/536621#M75860</link>
      <description>&lt;P&gt;I am creating a JMP app for users to analyze data without much knowlege of JMP or interaction with the platform.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a Graph Builder plot with a Line of Fit. When I right click on the plot, hover over Line of Fit, and select Save Formula, it saves the formula I want to the my data table so that I can continue analysis. I am unable to find a JSL function to do this to add to this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the section of my code I wish to run this action. I used the command &lt;CODE class=" language-jsl"&gt;{Save Predicteds} &lt;/CODE&gt;&amp;nbsp;among other possible solutions but it didn't work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;BR /&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 1057, 898 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Fit to Window,
		Variables(
			X( :"V1 Forward_PN(1)"n ),
			Y( :"I1 Forward_PN(1)"n ),
			Overlay( :Test Count )
			),
		Elements(
			Line Of Fit(
			X,
			Y,
			Legend( 29 ),
			Response Axis( "X" ),
			Confidence of Fit( 0 ),
			Equation( 1 ),
			{Save Predicteds} 
			)
		),
		Local Data Filter(
			Close Outline( 1 ),
			Add Filter(
				columns( :"I1 Forward_PN(1)"n, :Forward_Indicator ),
				Where(
					:"I1 Forward_PN(1)"n &amp;gt;= 0.003 &amp;amp; :"I1 Forward_PN(1)"n &amp;lt;= 0.00800009
				),
				Where( :Forward_Indicator == 1 )
			)
		),
		SendToReport(
			Dispatch( {}, "graph title", TextEditBox, {Set Text( "On Voltage" )} )
		)
	)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I believe there is a way to do this since there seems to be commands for everything. For example, if you want to clear row states, you can either go to the menu, click Rows and then click Clear Row states, or you can make a button that runs the code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt &amp;lt;&amp;lt; Clear Row States; &lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Thanks in advance for your help.&lt;/P&gt;</description>
      <pubDate>Sat, 10 Jun 2023 23:53:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-Line-of-Fit-gt-gt-Save-Formula/m-p/536621#M75860</guid>
      <dc:creator>trevorphysics</dc:creator>
      <dc:date>2023-06-10T23:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for Line of Fit &gt;&gt; Save Formula</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-Line-of-Fit-gt-gt-Save-Formula/m-p/536692#M75861</link>
      <description>&lt;P&gt;Here is one way which should work:&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(:height), Y(:weight)),
	Elements(Points(X, Y, Legend(1)), Line Of Fit(X, Y, Legend(3)))
);

wait(1); // demo purposes

gbb = Report(gb)[GraphBuilderBox(1)];
gbb &amp;lt;&amp;lt; updateElement(1, 1, 2, {Save Formula});&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Found from &lt;A href="https://community.jmp.com/t5/Discussions/JSL-to-save-smoother-formula-from-Graph-Builder/m-p/417840/highlight/true#M66698" target="_blank" rel="noopener"&gt; Re: JSL to save smoother formula from Graph Builder&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 23 Aug 2022 20:46:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-Line-of-Fit-gt-gt-Save-Formula/m-p/536692#M75861</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-08-23T20:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: JSL for Line of Fit &gt;&gt; Save Formula</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-for-Line-of-Fit-gt-gt-Save-Formula/m-p/536979#M75876</link>
      <description>&lt;P&gt;That works, thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 24 Aug 2022 17:36:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-for-Line-of-Fit-gt-gt-Save-Formula/m-p/536979#M75876</guid>
      <dc:creator>trevorphysics</dc:creator>
      <dc:date>2022-08-24T17:36:01Z</dc:date>
    </item>
  </channel>
</rss>

