<?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: Annotations outside the graph area: location and annotations not copied with graph in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/584396#M79027</link>
    <description>&lt;P&gt;Nice - thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 21 Dec 2022 15:48:52 GMT</pubDate>
    <dc:creator>DispersionSpark</dc:creator>
    <dc:date>2022-12-21T15:48:52Z</dc:date>
    <item>
      <title>Annotations outside the graph area: location and annotations not copied with graph</title>
      <link>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/583896#M78995</link>
      <description>&lt;P&gt;Annotations outside the graph area&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you annotate (using Tools&amp;gt;Annotate) inside the graph area, that text is part of the graph when copied — it appears that an annotation outside the graph area is not copied with the graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I would like is a single line of code that I could drop into every script that would note N in small text at the bottom right of each chart (below the X axis), and would be copied with the chart.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pseudocode would be something like Text (&amp;lt;bottom right&amp;gt;, “n=” || char(&amp;lt;non-excluded rows&amp;gt;))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So multiple subquestions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Is there a trick to getting annotations (via Tools&amp;gt;Annotate) that copy with a graph?&lt;/LI&gt;&lt;LI&gt;What JSL code do you use to position text at the bottom right of the background of a chart? (for example, is there a way of defining origin at the bottom right?)&lt;/LI&gt;&lt;LI&gt;What JSL code do you use to get the number of non-excluded rows in a table? It seems this should be obvious, (something like Rows() - Excluded Rows()), but I don't see it...&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;JMP 17, macOS&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 16:05:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/583896#M78995</guid>
      <dc:creator>DispersionSpark</dc:creator>
      <dc:date>2023-06-09T16:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Annotations outside the graph area: location and annotations not copied with graph</title>
      <link>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/583960#M78999</link>
      <description>&lt;P&gt;Not sure about question 1 but here is a script using &amp;lt;&amp;lt; Add Graphic Script to add text to graph builders bottom right corner&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(
	included_rows = N Rows(dt) - N Items(dt &amp;lt;&amp;lt; Get Excluded Rows());
	Text Color("Black");
	Text(Right Justified, 
		{X Origin() + X Range(), Y Origin()}, 
		Eval Insert("n=^included_rows^");
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1671562099616.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48530iC99F6DB5C30035E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1671562099616.png" alt="jthi_0-1671562099616.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should be able to turn that script into a expression/function/add-in which you can then easily re-use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 18:49:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/583960#M78999</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-12-20T18:49:21Z</dc:date>
    </item>
    <item>
      <title>Re: Annotations outside the graph area: location and annotations not copied with graph</title>
      <link>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/584157#M79004</link>
      <description>&lt;P&gt;Thanks! That works well at putting the number in the chart itself (example below). Is there a way to put it below the chart area?&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would seem that it is the bottom right of LineupBox (or AxisBox), but I can't get your approach to work with those. Suggestions?&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-center" image-alt="Screenshot 2022-12-20 at 16.29.52.png" style="width: 825px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48563iE01011B39AB5BE3F/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2022-12-20 at 16.29.52.png" alt="Screenshot 2022-12-20 at 16.29.52.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Dec 2022 21:38:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/584157#M79004</guid>
      <dc:creator>DispersionSpark</dc:creator>
      <dc:date>2022-12-20T21:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Annotations outside the graph area: location and annotations not copied with graph</title>
      <link>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/584356#M79019</link>
      <description>&lt;P&gt;Yes, there's a way to put it below the chart area, assuming you have JMP 17, and assuming that you're working with the Graph Builder instead of the Fit Y by X Platform. The trick is to add a Caption Box, then set it to be an Axis Table, then overwrite the defaults by deleting all but one of the labels (also, I had to change the Tick Labels to "Short Divider" to make every label show up in a contingency table). This can be done via scripting as well; example below.&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="Jed_Campbell_0-1671633221294.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48589i02AF2ABC6D66AB1A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jed_Campbell_0-1671633221294.png" alt="Jed_Campbell_0-1671633221294.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Jed_Campbell_1-1671633489118.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/48590iD353864CF7BA5678/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Jed_Campbell_1-1671633489118.png" alt="Jed_Campbell_1-1671633489118.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = open ("$SAMPLE_DATA\Big Class.jmp");

//Caption box as regular axis table 
graph_one = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :age ) ),
	Elements(
		Mosaic( X, Y, Legend( 6 ) ),
		Caption Box(
			X,
			Y,
			Legend( 7 ),
			Summary Statistic( "N" ),
			Location( "Axis Table" )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"sex",
			ScaleBox,
			{Label Row( 1, Tick Mark Style( "Short Mark" ) ),
			Label Row( 2, Tick Mark Style( "Short Divider" ) )}
		)
	)
);

//overwritten axis label with custom number (500)
graph_two = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 534, 464 ),
	Show Control Panel( 0 ),
	Variables( X( :sex ), Y( :age ) ),
	Elements(
		Mosaic( X, Y, Legend( 6 ) ),
		Caption Box(
			X,
			Y,
			Legend( 7 ),
			Summary Statistic( "N" ),
			Location( "Axis Table" )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"sex",
			ScaleBox,
			{Label Row( 1, Tick Mark Style( "Short Mark" ) ),
			Label Row(
				2,
				{Tick Mark Style( "Short Divider" ),
				Tick Mark( Label( "18" ), Label( "" ) ),  //&amp;lt;----here
				Tick Mark( Label( "22" ), Label( "500" ) )} //&amp;lt;--here
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 14:38:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/584356#M79019</guid>
      <dc:creator>Jed_Campbell</dc:creator>
      <dc:date>2022-12-21T14:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Annotations outside the graph area: location and annotations not copied with graph</title>
      <link>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/584396#M79027</link>
      <description>&lt;P&gt;Nice - thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 21 Dec 2022 15:48:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Annotations-outside-the-graph-area-location-and-annotations-not/m-p/584396#M79027</guid>
      <dc:creator>DispersionSpark</dc:creator>
      <dc:date>2022-12-21T15:48:52Z</dc:date>
    </item>
  </channel>
</rss>

