<?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 How to set a Reference Line on each page with Page option in Graph Builder? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798220#M97397</link>
    <description>&lt;P&gt;The following script plots some charts with the page option in graph builder? How to I set a horizontal reference line, for each chart, say at Weight = 80Kg and label it (80kg) using JSL?&lt;/P&gt;&lt;P&gt;(I need the reference line to remain even if there is a change in the number of charts plotted)&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(
	Size(528, 2954),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Page(:age)),
	Elements(Points(X, Y, Legend(15)), Smoother(X, Y, Legend(16)))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 12 Sep 2024 12:02:21 GMT</pubDate>
    <dc:creator>Neo</dc:creator>
    <dc:date>2024-09-12T12:02:21Z</dc:date>
    <item>
      <title>How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798220#M97397</link>
      <description>&lt;P&gt;The following script plots some charts with the page option in graph builder? How to I set a horizontal reference line, for each chart, say at Weight = 80Kg and label it (80kg) using JSL?&lt;/P&gt;&lt;P&gt;(I need the reference line to remain even if there is a change in the number of charts plotted)&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(
	Size(528, 2954),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Page(:age)),
	Elements(Points(X, Y, Legend(15)), Smoother(X, Y, Legend(16)))
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Sep 2024 12:02:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798220#M97397</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-09-12T12:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798279#M97404</link>
      <description>&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(
	Size(528, 2954),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Page(:age)),
	Elements(Points(X, Y, Legend(15)), Smoother(X, Y, Legend(16)))
);

axis = gb &amp;lt;&amp;lt; XPath( "//AxisBox" );
Summarize( page = By( :age ) );
axis[2::(2*NItems( page ))::2] &amp;lt;&amp;lt; Add Ref Line( 80, "Solid", "Red", "Reference" );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Sep 2024 14:36:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798279#M97404</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2024-09-12T14:36:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798292#M97406</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/5358"&gt;@Mark_Bailey&lt;/a&gt;&amp;nbsp; Stops working for me (JMP 16.2) if I invoke Local Data Filter on Age after plotting, as below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Neo_0-1726153593695.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68176iED5C69D0BDD3CDFF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Neo_0-1726153593695.png" alt="Neo_0-1726153593695.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 15:06:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798292#M97406</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-09-12T15:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798309#M97409</link>
      <description>&lt;P&gt;Easiest way is to add new column to your data table with same value for each of the rows and add that to your graph. This will work with filters&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 15:37:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798309#M97409</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-12T15:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798334#M97413</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;your suggestion works fine, except that I would like the line label to be on the right. Is there a way to change the location of the line label?&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 16:34:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798334#M97413</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-09-12T16:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798387#M97416</link>
      <description>&lt;P&gt;I don't remember which options are available in JMP16 as I'm mostly using JMP18 nowadays (with some JMP17 mixed in)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

dt &amp;lt;&amp;lt; New Column("Ref", Numeric, Continuous, Set Each Value(80));

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(528, 984),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Y(:Ref, Position(1)), Page(:age)),
	Elements(
		Points(X, Y(1), Legend(15)),
		Smoother(X, Y(1), Legend(16)),
		Line(Y(2), Legend(17))
	),
	Local Data Filter(
		Add Filter(
			columns(:age),
			Where(:age == {12, 15}),
			Display(:age, N Items(6))
		)
	),
	SendToReport(
		Dispatch({}, "400", ScaleBox,
			{Legend Model(
				17,
				Level Name(0, "Ref", Item ID("Mean(Ref)", 1)),
				Properties(
					0,
					{Line Label Properties(
						{Name Label(1), Name Label Position("Last")}
					)},
					Item ID("Mean(Ref)", 1)
				)
			)}
		)
	)
);

Write();&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-1726163173773.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68199iD9B8CBB7FFD4B401/image-size/medium?v=v2&amp;amp;px=400" role="button" title="jthi_0-1726163173773.png" alt="jthi_0-1726163173773.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 17:46:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798387#M97416</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-12T17:46:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798413#M97421</link>
      <description>&lt;P&gt;No need to change the data table.&lt;BR /&gt;&lt;BR /&gt;Replicating the axis setting via&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Link Page Axes( "Y Only" )&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;copies the reference lines as well.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
	Link Page Axes( "Y Only" ),
	Variables( X( :height ), Y( :weight ), Page( :sex ), Overlay( :sex ) ),
	Elements( Points( X, Y), Smoother( X, Y) ),
	SendToReport(
		Dispatch( {}, "weight", ScaleBox,
			{Add Ref Line( 100, "Solid", "Black", "", 1 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&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="hogi_0-1726169228867.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/68203i22C1654EAA13438D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1726169228867.png" alt="hogi_0-1726169228867.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2024 19:27:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798413#M97421</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-09-12T19:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798461#M97427</link>
      <description>&lt;P&gt;That is also an option, but you do lose one of the benefits of Page: having different axis scaling for different "pages". It might not be an issue here and might be even a benefit.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 04:48:11 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798461#M97427</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-13T04:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798517#M97441</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;&amp;nbsp;Thanks.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Name Label Position("Last")&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;does not seem to be available/ working in JMP 16.2.&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/26800"&gt;@hogi&lt;/a&gt;&amp;nbsp;Reason for me choosing the Page option is so that I can get different y-axis scaling. I am sure there are other ways of doing this, but Page option seems easiest.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 09:09:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798517#M97441</guid>
      <dc:creator>Neo</dc:creator>
      <dc:date>2024-09-13T09:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798526#M97445</link>
      <description>&lt;P&gt;Then you might have to go back to Mark's solution and use filter change handler with it. Again no idea what are the limitations of JMP16 with this option&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(
	Size(528, 984),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Page(:age)),
	Elements(
		Points(X, Y(1), Legend(15)),
		Smoother(X, Y(1), Legend(16))
	),
	Local Data Filter(
		Add Filter(
			columns(:age),
			Where(:age == {12, 15}),
			Display(:age, N Items(6))
		)
	)
);

add_reflines = EvalExpr(
	axis = Expr(gb) &amp;lt;&amp;lt; XPath("//AxisBox");
	axis[2::N Items(axis)::2] &amp;lt;&amp;lt; Add Ref Line(80, "Solid", "Red", "Reference", 1, 1, Label Settings({Opposite Axis(1)}));
);

f = Function({a}, add_reflines);

ldf = (Report(gb) &amp;lt;&amp;lt; top parent)[OutlineBox("Local Data Filter")] &amp;lt;&amp;lt; Get Scriptable Object;

rs = ldf &amp;lt;&amp;lt; Make Filter Change Handler(f);

add_reflines;
Write();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This isn't the most robust option to do this, but it is fairly simple one.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2024 10:19:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798526#M97445</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-13T10:19:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to set a Reference Line on each page with Page option in Graph Builder?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798527#M97446</link>
      <description>&lt;P&gt;And graphic script might be an option&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(
	Size(528, 984),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Page(:age)),
	Elements(
		Points(X, Y(1), Legend(15)),
		Smoother(X, Y(1), Legend(16))
	)
);

(Report(gb) &amp;lt;&amp;lt; XPath("//FrameBox")) &amp;lt;&amp;lt; Add Graphics Script(
	Pen Color("Red");
	Text Color("red");
	Text(Right Justified, {X Origin() + X Range(), 80}, "Reference");
	H Line(80);
);


gb &amp;lt;&amp;lt; Local Data Filter(
	Add Filter(
		columns(:age),
		Display(:age, N Items(6))
	)
);

Write();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 13 Sep 2024 10:30:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-set-a-Reference-Line-on-each-page-with-Page-option-in/m-p/798527#M97446</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-09-13T10:30:38Z</dc:date>
    </item>
  </channel>
</rss>

