<?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 insert text in frames in fit curve platform with Group and By variables (JMP 18) in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770115#M95105</link>
    <description>&lt;P&gt;Hi jthi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your reply. Please let me clarify my question:&lt;/P&gt;&lt;P&gt;Your script inserts "F12" in every framebox with data of females but I would need a specific text in every framebox with linear fits.&lt;/P&gt;&lt;P&gt;I think this can be realized by using "reports [1]", "reports [2]" etc. instead of "cur_report" and without the "For Each..." function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a reason, why you use "Try" and a potential error message instead of Eval? What could make the insertion of the Graphics Script fail?&lt;/P&gt;</description>
    <pubDate>Wed, 03 Jul 2024 17:24:51 GMT</pubDate>
    <dc:creator>PolygonStallion</dc:creator>
    <dc:date>2024-07-03T17:24:51Z</dc:date>
    <item>
      <title>How to insert text in frames in fit curve platform with Group and By variables (JMP 18)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770002#M95092</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to insert a text in frames in the fit curve platform using a Group and a By variable via JSL (JMP 18).&lt;/P&gt;&lt;P&gt;Therefore I tried the following code, but it doesn't 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");
obj = dt &amp;lt;&amp;lt; Fit Curve(Y(:weight), X(:height), Group(:sex), Fit Linear, By(:age));

robj = obj &amp;lt;&amp;lt; report;

(robj &amp;lt;&amp;lt; XPath(
	"(//OutlineBox[text()='Fit Curve']//OutlineBox[text()='age=12']//OutlineBox[text()='Linear']//OutlineBox[text()='Plot']//FrameBox)[2]"
)) &amp;lt;&amp;lt; Add Graphics Script( 1, Description( "Script" ), Text( {52, 120}, "F 12" ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I copied the XPath from the properties of the frame using Mode: XPath and Root: Window.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In JMP 17, this works with the following code:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
obj = dt &amp;lt;&amp;lt; Fit Curve(Y(:weight), X(:height), Group(:sex), Fit Linear, By(:age));

robj = obj &amp;lt;&amp;lt; report;
&lt;BR /&gt;(robj &amp;lt;&amp;lt; XPath( "(//OutlineBox[text()='Fit Curve age=12']//OutlineBox[text()='Linear']//OutlineBox[text()='Plot']//FrameBox)[2]" )) &amp;lt;&amp;lt;
Add Graphics Script( 1, Description( "Script" ), Text( {52, 120}, "F 12" ) );&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The result should look like this for Fit curve age=12 (screenshot from JMP 17):&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PolygonStallion_0-1719998721107.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/65824i70F600607D24BA30/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PolygonStallion_0-1719998721107.png" alt="PolygonStallion_0-1719998721107.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Many thanks for your help!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 09:37:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770002#M95092</guid>
      <dc:creator>PolygonStallion</dc:creator>
      <dc:date>2024-07-03T09:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert text in frames in fit curve platform with Group and By variables (JMP 18)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770012#M95093</link>
      <description>&lt;P&gt;I would most likely use the list of platforms you get and loop over that (unless you wish to have exactly same text for each of the frameboxes in same location, then I would maybe use XPath and top level of the report)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

fcs = dt &amp;lt;&amp;lt; Fit Curve(Y(:weight), X(:height), Group(:sex), Fit Linear, By(:age));

reports = fcs &amp;lt;&amp;lt; report;

For Each({cur_report}, reports,
	//cur_report = reports[1];
	Try(
		cur_report[Outline Box("Linear"), OutlineBox("Plot"), FrameBox(2)] &amp;lt;&amp;lt; Add Graphics Script(1,
			Text({52, 120}, "F 12")
		);
	,
		Write("\!NIssue with ", cur_report &amp;lt;&amp;lt; get title, "\!N", exception_msg);
	);
);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 03 Jul 2024 09:55:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770012#M95093</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-03T09:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert text in frames in fit curve platform with Group and By variables (JMP 18)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770115#M95105</link>
      <description>&lt;P&gt;Hi jthi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Many thanks for your reply. Please let me clarify my question:&lt;/P&gt;&lt;P&gt;Your script inserts "F12" in every framebox with data of females but I would need a specific text in every framebox with linear fits.&lt;/P&gt;&lt;P&gt;I think this can be realized by using "reports [1]", "reports [2]" etc. instead of "cur_report" and without the "For Each..." function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a reason, why you use "Try" and a potential error message instead of Eval? What could make the insertion of the Graphics Script fail?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 17:24:51 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770115#M95105</guid>
      <dc:creator>PolygonStallion</dc:creator>
      <dc:date>2024-07-03T17:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert text in frames in fit curve platform with Group and By variables (JMP 18)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770121#M95109</link>
      <description>&lt;P&gt;Your example added same text to each of the frameboxes so I did the same (as in I didn't know what you wanted to add). Adding the graphic script will fail if the report doesn't have curves fit, for example there could be too few observations.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Jul 2024 19:15:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770121#M95109</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-07-03T19:15:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to insert text in frames in fit curve platform with Group and By variables (JMP 18)</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770190#M95123</link>
      <description>&lt;P&gt;&lt;SPAN class=""&gt;Now&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;I&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;understand,&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;thank&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;you&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;for&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;the&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;explanation&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;and&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;for&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;your&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;support!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Jul 2024 07:15:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-insert-text-in-frames-in-fit-curve-platform-with-Group/m-p/770190#M95123</guid>
      <dc:creator>PolygonStallion</dc:creator>
      <dc:date>2024-07-04T07:15:54Z</dc:date>
    </item>
  </channel>
</rss>

