<?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 Automatically Add Reference Lines to Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Automatically-Add-Reference-Lines-to-Graph-Builder/m-p/945890#M109680</link>
    <description>&lt;P&gt;I have a graph created by graph builder and a column in the data contains a constant value that I'd like to automatically add as a reference line to the graph.&amp;nbsp; Adding the column to the plot axis gives me something (green vertical below) but it's not great looking, any better ideas?&amp;nbsp;&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="SpannerHead_0-1777923121481.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/101961iC998B1F66149E14A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpannerHead_0-1777923121481.png" alt="SpannerHead_0-1777923121481.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 May 2026 19:32:21 GMT</pubDate>
    <dc:creator>SpannerHead</dc:creator>
    <dc:date>2026-05-04T19:32:21Z</dc:date>
    <item>
      <title>Automatically Add Reference Lines to Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Automatically-Add-Reference-Lines-to-Graph-Builder/m-p/945890#M109680</link>
      <description>&lt;P&gt;I have a graph created by graph builder and a column in the data contains a constant value that I'd like to automatically add as a reference line to the graph.&amp;nbsp; Adding the column to the plot axis gives me something (green vertical below) but it's not great looking, any better ideas?&amp;nbsp;&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="SpannerHead_0-1777923121481.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/101961iC998B1F66149E14A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SpannerHead_0-1777923121481.png" alt="SpannerHead_0-1777923121481.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 19:32:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Automatically-Add-Reference-Lines-to-Graph-Builder/m-p/945890#M109680</guid>
      <dc:creator>SpannerHead</dc:creator>
      <dc:date>2026-05-04T19:32:21Z</dc:date>
    </item>
    <item>
      <title>Re: Automatically Add Reference Lines to Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Automatically-Add-Reference-Lines-to-Graph-Builder/m-p/945903#M109681</link>
      <description>&lt;P&gt;Here is a simple example that draws a reference line based upon the value of row 1 from column Weight&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1777928150565.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/101962iC6D65FE6931A8A3C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1777928150565.png" alt="txnelson_0-1777928150565.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;
Graph Builder(
	Variables( X( :weight ), Y( :height ) ),
	Elements( Points( X, Y, Legend( 6 ) ), Smoother( X, Y, Legend( 7 ) ) ),
	SendToReport(
		Dispatch( {}, {:weight}, ScaleBox,
			{Add Ref Line( 95, "Solid", "Red", "", 1 )}
		),
		Dispatch( {}, "Graph Builder", FrameBox,
			{Add Graphics Script(
				2,
				Description( "" ),
				rp = Current Report();
				rp[axis box( 1 )] &amp;lt;&amp;lt; add ref line( :weight[1], "solid", red );
			)}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I produced the complete JSL by right clicking on the graph and selecting Customize.&amp;nbsp; Then clicking on the "+" and writing the simple script&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;rp=current report();
rp[axis box(1)] &amp;lt;&amp;lt; add ref line(:weight[1],"solid",red)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_1-1777928331410.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/101964iE8A4B3800236A10C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_1-1777928331410.png" alt="txnelson_1-1777928331410.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;After applying the little script, I went back to the red triangle in the graph, and saved the script to a script window.&lt;/P&gt;</description>
      <pubDate>Mon, 04 May 2026 21:00:06 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Automatically-Add-Reference-Lines-to-Graph-Builder/m-p/945903#M109681</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2026-05-04T21:00:06Z</dc:date>
    </item>
  </channel>
</rss>

