<?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: Text position in Graph Box - is there a bug? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/973056#M110590</link>
    <description>&lt;P&gt;Left a comment there. Any tips on estimating the size of the text to be able to place it at the left boundary of the plot?&lt;/P&gt;</description>
    <pubDate>Wed, 23 Sep 2026 17:12:59 GMT</pubDate>
    <dc:creator>miguello</dc:creator>
    <dc:date>2026-09-23T17:12:59Z</dc:date>
    <item>
      <title>Text position in Graph Box - is there a bug?</title>
      <link>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/972939#M110581</link>
      <description>&lt;P&gt;Here's the script that roughly does what I need, at least visually:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

New Window( "Example",
	Graph Box(

		Pen Color("red");
		Back Color ("Light Yellow");
		Text Color( "red" );
		Text( Boxed, Erased, {20, 85}, "MyTextHere" );
		Text( Boxed, Erased, {20, 75}, "AnotherTextHere" );
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And I need several labels styled just like that.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2026-09-22 16_25_35-Example 13 - JMP [2].png" style="width: 380px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/118044i392212AFCC45F4F3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2026-09-22 16_25_35-Example 13 - JMP [2].png" alt="2026-09-22 16_25_35-Example 13 - JMP [2].png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;But I need them left justified - and they are center justified in this image.&lt;BR /&gt;There is no separate "Left Justified" - it should be like that by default. But as soon as you include "Boxed" - it becomes Center Justified.&lt;/P&gt;
&lt;P&gt;The script in the manual (&lt;A href="https://www.jmp.com/support/help/en/19.0/#page/jmp/add-text.shtml#)" target="_blank"&gt;https://www.jmp.com/support/help/en/19.0/#page/jmp/add-text.shtml#)&lt;/A&gt;&amp;nbsp;has this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;mytext = New Window( "Adding Text",
	Graph Box(
		Frame Size( 200, 200 ),
		Y Scale( 0, 15 ),
		X Scale( 0, 10 ),
		Text Size( 9 );
		Text Color( "blue" );
		Text( {5, 1}, "Left Justified" );
		Text( Center Justified, {5, 2}, "Center Justified" );
		Text( Right Justified, {5, 3}, "Right Justified" );
		Fill Color( 4 );
		Rect( 5, 8, 9, 5, 1 );
		Text( Erased, {6, 6}, "Erased" );
		Text( Boxed, {6, 10}, "Boxed" );
		Text( Clockwise, {4, 10}, "Clockwise" );
		Text( Counterclockwise, {3, 5}, "Counterclockwise" );
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and according to the manual it produces this plot:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Text.png" style="width: 263px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/118045iE524B27B28963714/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Text.png" alt="Text.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;While if I run it on my JMP I see this:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2026-09-22 16_27_47-Adding Text - JMP [2].png" style="width: 249px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/118046i13D18DD99284A130/image-size/medium?v=v2&amp;amp;px=400" role="button" title="2026-09-22 16_27_47-Adding Text - JMP [2].png" alt="2026-09-22 16_27_47-Adding Text - JMP [2].png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The Boxed text becomes Center Justified.&lt;BR /&gt;Is this a bug? Any way to fix this? I do need boxed and erased style to preserve feel and look when switching from Text Annotations to the Graphics Script.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;The reason I switch from Text Annotation to Graphics Script is to be able to refresh those labels on redraw - for instance, after Automatic Recalc. Is there a way to do that on Text Annotations, or do I have to switch to Graphics Script?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2026 23:34:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/972939#M110581</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-09-22T23:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: Text position in Graph Box - is there a bug?</title>
      <link>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/972999#M110585</link>
      <description>&lt;P&gt;There is a wish list item created by Jim&amp;nbsp;&lt;LI-MESSAGE title="Provide a &amp;amp;quot;Left Justify&amp;amp;quot; option to the Graphic Text() function" uid="772480" url="https://community.jmp.com/t5/JMP-Wish-List/Provide-a-quot-Left-Justify-quot-option-to-the-Graphic-Text/m-p/772480#U772480" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-idea-thread lia-fa-icon lia-fa-idea lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2026 07:28:31 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/972999#M110585</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-09-23T07:28:31Z</dc:date>
    </item>
    <item>
      <title>Re: Text position in Graph Box - is there a bug?</title>
      <link>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/973056#M110590</link>
      <description>&lt;P&gt;Left a comment there. Any tips on estimating the size of the text to be able to place it at the left boundary of the plot?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2026 17:12:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/973056#M110590</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2026-09-23T17:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Text position in Graph Box - is there a bug?</title>
      <link>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/973084#M110592</link>
      <description>&lt;P&gt;No good options, but I think TextBox with the same text could be the same size but you will get it in pixels and if you need to place it based on coordinates you will have to do some calculations.&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);

nw = New Window("", &amp;lt;&amp;lt; Window View("Invisible"),
	Text Box("MyTextHere"),
	Text Box("AnotherTextHere")
);

tbs = nw &amp;lt;&amp;lt; XPath("//TextBox");
sizes = tbs &amp;lt;&amp;lt; get size;
nw &amp;lt;&amp;lt; Close Window;

show(sizes); // sizes = {{65, 17}, {92, 17}};

Write();

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is also Pixel Text() which could be easier option depending on your use case&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-SPOILER&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("", &amp;lt;&amp;lt;Window View("Invisible"), Text Box("MyTextHere"), Text Box("AnotherTextHere"));

tbs = nw &amp;lt;&amp;lt; XPath("//TextBox");
sizes = tbs &amp;lt;&amp;lt; get size;
texts = tbs &amp;lt;&amp;lt; get text;
nw &amp;lt;&amp;lt; Close Window;

aa = Associative Array(texts, sizes);
Show(sizes); // sizes = {{65, 17}, {92, 17}};

nw = New Window("Example",
	Graph Box(
		Pixel Origin(20, 85); // in axis coordinates
		Pen Color("red");
		Fill Color("Light Yellow");
		Text Color("red");
		Pixel Path(0, 0, path = [-3 -15 1, 67 -15 2, 67 5 2, -3 5 -2], 1, 1);
		Pixel Path(0, 0, path = [-3 -15 1, 67 -15 2, 67 5 2, -3 5 -2], 0, 1);
		Pixel Text({0, 0}, "MyTextHere");
		Pixel Origin(20, 75);
		
		Pixel Path(0, 0, path = [-3 -15 1, 94 -15 2, 94 5 2, -3 5 -2], 1, 1);
		Pixel Path(0, 0, path = [-3 -15 1, 94 -15 2, 94 5 2, -3 5 -2], 0, 1);
		Pixel Text({0, 0}, "AnotherTextHere");
	)
);

Write();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="jthi_0-1790191950384.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/118148i72A40BCC4B35DD87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1790191950384.png" alt="jthi_0-1790191950384.png" /&gt;&lt;/span&gt;&lt;/LI-SPOILER&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2026 19:33:23 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Text-position-in-Graph-Box-is-there-a-bug/m-p/973084#M110592</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-09-23T19:33:23Z</dc:date>
    </item>
  </channel>
</rss>

