<?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: FrameBox does not retain reference lines when inserted into another display box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352362#M60175</link>
    <description>I give that a try. Thanks again for the quick reply!</description>
    <pubDate>Sun, 24 Jan 2021 22:16:50 GMT</pubDate>
    <dc:creator>Mittman</dc:creator>
    <dc:date>2021-01-24T22:16:50Z</dc:date>
    <item>
      <title>FrameBox does not retain reference lines when inserted into another display box</title>
      <link>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352217#M60154</link>
      <description>&lt;P&gt;I know that reference lines are a properties of Axis Boxes, but what is a workaround? The use case is to Lineup boxes to combine elements from multiple plots into one. I was unable to find my answer on the discussion boards here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Data Table("Big Class");

gbBar = Graph Builder(
	Size( 521, 452 ),
	Show Control Panel( 0 ),
	Variables( X( :age ) ),
	Elements( Bar( X, Legend( 3 ) ) ),
	SendToReport(
		Dispatch(
			{},
			"age",
			ScaleBox,
			{Add Ref Line( 1.5, "Solid", "Medium Dark Red", "", 1 )}
		)
	)
);

nw = New Window("for testing",
	OutlineBox("stuff",
		db1 = H List Box();
	)
);

db1 &amp;lt;&amp;lt; Append(report(gbBar)[FrameBox(1)]);&lt;/CODE&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;jmpversion()
/*:

"14.3.0"&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:10:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352217#M60154</guid>
      <dc:creator>Mittman</dc:creator>
      <dc:date>2023-06-11T11:10:22Z</dc:date>
    </item>
    <item>
      <title>Re: FrameBox does not retain reference lines when inserted into another display box</title>
      <link>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352260#M60156</link>
      <description>&lt;P&gt;Append the PictureBox() rather than the FrameBox()&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;db1 &amp;lt;&amp;lt; Append(report(gbBar)[PictureBox(1)]);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pb1.PNG" style="width: 623px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29659i6D5C8BC6864BE6F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="pb1.PNG" alt="pb1.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Jan 2021 21:31:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352260#M60156</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-01-23T21:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: FrameBox does not retain reference lines when inserted into another display box</title>
      <link>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352360#M60173</link>
      <description>&lt;P&gt;Thanks for the quick response. This won't work as the Picture Box contains axes and legend. I am using a lineup box so that I can align other elements with the x-axis. Simplified example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Data Table( "Big Class" );

gbBar = Graph Builder(
	Size( 521, 452 ),
	Show Control Panel( 0 ),
	Variables( X( :age ) ),
	Elements( Bar( X, Legend( 3 ) ) ),
	SendToReport( Dispatch( {}, "age", ScaleBox, {Add Ref Line( 1.5, "Solid", "Medium Dark Red", "", 1 )} ) )
);

nw = New Window( "for testing",
	Outline Box( "complicated plot",
		Spacer Box( Size( 2, 10 ) ),
		lu1 = Lineup Box( N Col( 3 ), Spacing( 0 ) )
	)
);

lu1 &amp;lt;&amp;lt; Append( Report( gbBar )[AxisBox( 2 )] );
lu1 &amp;lt;&amp;lt; Append( Report( gbBar )[FrameBox( 1 )] );
lu1 &amp;lt;&amp;lt; Append( Report( gbBar )[LegendBox( 1 )] );
//end of row
lu1 &amp;lt;&amp;lt; Append( Spacer Box() );
lu1 &amp;lt;&amp;lt; Append( Report( gbBar )[AxisBox( 1 )] );
lu1 &amp;lt;&amp;lt; Append( Spacer Box() );
//end of row
lu1 &amp;lt;&amp;lt; Append( Spacer Box() );
lu1 &amp;lt;&amp;lt; Append( insrt_icons = H List Box() );
lu1 &amp;lt;&amp;lt; Append( Spacer Box() );

numXAxisWidth = (gbBar &amp;lt;&amp;lt; report)[AxisBox( 1 )] &amp;lt;&amp;lt; get width;
numAges = N Items( Associative Array( Column( dt, "age" ) ) &amp;lt;&amp;lt; get keys );
numOneIncr = (numXAxisWidth) / (numAges);

For( _i = 1, _i &amp;lt;= numAges, _i++, 
	
	insrt_icons &amp;lt;&amp;lt; Append( Spacer Box( Size( numOneIncr, numOneIncr ), Color( _i ) ) )
);

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I would be happy to learn an alternative approach. Initially, I tried using spacer boxes that match the width of elements (using &amp;lt;&amp;lt; get width), but that failed because there was some margin I couldn't account for.&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="Screenshot 2021-01-24 133836.jpg" style="width: 603px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/29667i4F99FBF4865D33BA/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2021-01-24 133836.jpg" alt="Screenshot 2021-01-24 133836.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 24 Jan 2021 21:39:57 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352360#M60173</guid>
      <dc:creator>Mittman</dc:creator>
      <dc:date>2021-01-24T21:39:57Z</dc:date>
    </item>
    <item>
      <title>Re: FrameBox does not retain reference lines when inserted into another display box</title>
      <link>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352361#M60174</link>
      <description>&amp;lt;&amp;lt; Add Graphics Script is an extension to the FrameBox, so I suggest you move from using Reference Lines to using the Line() function in &amp;lt;&amp;lt; Add Graphics Script to generate your lines.</description>
      <pubDate>Sun, 24 Jan 2021 21:46:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352361#M60174</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-01-24T21:46:06Z</dc:date>
    </item>
    <item>
      <title>Re: FrameBox does not retain reference lines when inserted into another display box</title>
      <link>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352362#M60175</link>
      <description>I give that a try. Thanks again for the quick reply!</description>
      <pubDate>Sun, 24 Jan 2021 22:16:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/352362#M60175</guid>
      <dc:creator>Mittman</dc:creator>
      <dc:date>2021-01-24T22:16:50Z</dc:date>
    </item>
    <item>
      <title>Re: FrameBox does not retain reference lines when inserted into another display box</title>
      <link>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/353319#M60275</link>
      <description>&lt;P&gt;For completeness, here is a code example showing difference between Reference Line and V/H Line with &amp;lt;&amp;lt; Add Graphics Script.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

gbBar = dt &amp;lt;&amp;lt; Graph Builder(
	Size( 521, 452 ),
	Show Control Panel( 0 ),
	Variables( X( :age ) ),
	Elements( Bar( X, Legend( 3 ) ) ),
	SendToReport( Dispatch( {}, "age", ScaleBox, {Add Ref Line( 2.5, "Solid", "Medium Dark Red", "", 1 )} ) )
); // reference lines do not show up in FrameBox

fboxBar = Report( gbBar )[FrameBox( 1 )];
fboxBar &amp;lt;&amp;lt;
	Add Graphics Script(
	1, // draws the line first
	Pen Color( "gray" );
	Pen Size( 1 );
	V Line([0.5, 1.5]);
); // graphics script applies to frame box, as required

nw = New Window("for testing",
	lu1 = Lineup Box(fboxBar)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 27 Jan 2021 15:50:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/FrameBox-does-not-retain-reference-lines-when-inserted-into/m-p/353319#M60275</guid>
      <dc:creator>Mittman</dc:creator>
      <dc:date>2021-01-27T15:50:15Z</dc:date>
    </item>
  </channel>
</rss>

