<?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: How to add reference line if you don't know what column you will use in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-add-reference-line-if-you-don-t-know-what-column-you-will/m-p/550499#M76660</link>
    <description>&lt;P&gt;Nothing wrong with neither mine or yours, I was just hoping that there is a generic way of doing that. Use case: I model GB using graph builder first, where I set up all the reference lines, and ideally just would copy the script. But now I need to delete that part and write it separately as my solution, or tweak it as in your solution.&lt;/P&gt;&lt;P&gt;Anyways, thanks for the input!&lt;/P&gt;</description>
    <pubDate>Wed, 28 Sep 2022 22:38:30 GMT</pubDate>
    <dc:creator>miguello</dc:creator>
    <dc:date>2022-09-28T22:38:30Z</dc:date>
    <item>
      <title>How to add reference line if you don't know what column you will use</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-reference-line-if-you-don-t-know-what-column-you-will/m-p/550439#M76654</link>
      <description>&lt;P&gt;I'm stuck at a seemingly simple task.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I plot a Graph Builder where my Y axis isn't known yet, it's provided as a variable.&lt;/P&gt;&lt;P&gt;So what do I put in here instead of MyYVariable to draw a reference line regardless of what's on Y axis?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;			Dispatch(
			{},
			"MyYVariable",
			ScaleBox,
			{Add Ref Line(
				0.1,
				"Dotted",
				"Medium Dark Green",
				"0.1",
				3,
				1,
				Label Settings( {Label Color( "Green" )} )
			), Label Row(
				{Label Orientation( "Vertical" ), Set Font( "OCR A Extended" )}
			)}
		)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Clarification:&lt;/P&gt;&lt;P&gt;Right now I'm doing that like this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gbr = gb&amp;lt;&amp;lt;Report;
gbr[axis box( 2 )] &amp;lt;&amp;lt; Add Ref Line(
				0.1,
				"Dotted",
				"Medium Dark Green",
				"0.1",
				3,
				1,
				Label Settings( {Label Color( "Green" )} )
			);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;but I was wondering if I could do it in the same expression as the GraphBuilder, as I asked.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 15:59:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-reference-line-if-you-don-t-know-what-column-you-will/m-p/550439#M76654</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2023-06-09T15:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to add reference line if you don't know what column you will use</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-reference-line-if-you-don-t-know-what-column-you-will/m-p/550476#M76657</link>
      <description>&lt;P&gt;Is the something wrong with your option2? If you are building graph builder, you should know column names and then you could most likely use&amp;nbsp; &lt;LI-MESSAGE title="Insert one expression into another using Eval Insert, Eval Expr, Parse, and Substitute" uid="48998" url="https://community.jmp.com/t5/JSL-Cookbook-Archived/Insert-one-expression-into-another-using-Eval-Insert-Eval-Expr/m-p/48998#U48998" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-tkb-thread lia-fa-icon lia-fa-tkb lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; or similar method to add the "name" there. &lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

dt = Open("$SAMPLE_DATA/Big Class.jmp");

y_var = Column(dt, "height");

gb_expr = EvalExpr(gb = dt &amp;lt;&amp;lt; Graph Builder(
	Variables(Y(Expr(y_var))),
	Elements(Points(Y, Legend(4))),
	SendToReport(
		Dispatch(
			{},
			Expr(y_var &amp;lt;&amp;lt; get name),
			ScaleBox,
			{Add Ref Line(63.858764556962, "Solid", "Black", "", 1)}
		)
	)
));

show(gb_expr);

eval(gb_expr);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 28 Sep 2022 21:25:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-reference-line-if-you-don-t-know-what-column-you-will/m-p/550476#M76657</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-09-28T21:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to add reference line if you don't know what column you will use</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-add-reference-line-if-you-don-t-know-what-column-you-will/m-p/550499#M76660</link>
      <description>&lt;P&gt;Nothing wrong with neither mine or yours, I was just hoping that there is a generic way of doing that. Use case: I model GB using graph builder first, where I set up all the reference lines, and ideally just would copy the script. But now I need to delete that part and write it separately as my solution, or tweak it as in your solution.&lt;/P&gt;&lt;P&gt;Anyways, thanks for the input!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Sep 2022 22:38:30 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-add-reference-line-if-you-don-t-know-what-column-you-will/m-p/550499#M76660</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2022-09-28T22:38:30Z</dc:date>
    </item>
  </channel>
</rss>

