<?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 Adding multiple horizonal reference lines based on columns in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Adding-multiple-horizonal-reference-lines-based-on-columns/m-p/475601#M72014</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm having trouble adding a horizontal reference line in my plot based on a column parameter. The code is attached below. I need the reference line to be a horizontal line not a vertical line:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
quantile_plot = Graph Builder(
	Size( 528, 631 ),
	Show Control Panel( 0 ),
	Variables( X( :Dataset ), Y( :y ), Color( :SAMPLEID ) ),
	Elements( Points( X, Y, Legend( 4 ), Jitter( "Random Uniform" ) ) ),
	Local Data Filter(
		Add Filter(
			columns( :Gender, :Ethnicity, :Age, :Congener ),
			Where( :Gender == "1" ),
			Where( :Ethnicity == "3" ),
			Where( :Age == "4" ),
			Where( :Congener == "LBC028" ),
			Display( :Ethnicity, N Items( 5 ) ),
			Display( :Age, N Items( 4 ) ),
			Display( :Congener, N Items( 15 ), Find( Set Text( "" ) ) )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"Dataset",
			ScaleBox,
			{Add Ref Line( -0.5, "Solid", "Red", "", 2 )}
		),
		Dispatch(
			{},
			"y",
			ScaleBox,
			{Scale( "Log" ), Format( "Best", 6 ), Min( 0.261333735635329 ),
			Max( 20 ), Inc( 1 ), Minor Ticks( 1 )}
		)
	)
);
report(quantile_plot)[axisbox(2)] &amp;lt;&amp;lt; Add Ref Line( threshold, "solid", black, "", 2 );

report(quantile_plot)[axisbox(2)]&amp;lt;&amp;lt;  min(threshold);&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="MikeDereviankin_0-1649011473283.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41444i476DC0A70993E86B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MikeDereviankin_0-1649011473283.png" alt="MikeDereviankin_0-1649011473283.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 18:15:09 GMT</pubDate>
    <dc:creator>MikeDereviankin</dc:creator>
    <dc:date>2023-06-09T18:15:09Z</dc:date>
    <item>
      <title>Adding multiple horizonal reference lines based on columns</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-multiple-horizonal-reference-lines-based-on-columns/m-p/475601#M72014</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I'm having trouble adding a horizontal reference line in my plot based on a column parameter. The code is attached below. I need the reference line to be a horizontal line not a vertical line:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default to Here( 1 );
quantile_plot = Graph Builder(
	Size( 528, 631 ),
	Show Control Panel( 0 ),
	Variables( X( :Dataset ), Y( :y ), Color( :SAMPLEID ) ),
	Elements( Points( X, Y, Legend( 4 ), Jitter( "Random Uniform" ) ) ),
	Local Data Filter(
		Add Filter(
			columns( :Gender, :Ethnicity, :Age, :Congener ),
			Where( :Gender == "1" ),
			Where( :Ethnicity == "3" ),
			Where( :Age == "4" ),
			Where( :Congener == "LBC028" ),
			Display( :Ethnicity, N Items( 5 ) ),
			Display( :Age, N Items( 4 ) ),
			Display( :Congener, N Items( 15 ), Find( Set Text( "" ) ) )
		)
	),
	SendToReport(
		Dispatch(
			{},
			"Dataset",
			ScaleBox,
			{Add Ref Line( -0.5, "Solid", "Red", "", 2 )}
		),
		Dispatch(
			{},
			"y",
			ScaleBox,
			{Scale( "Log" ), Format( "Best", 6 ), Min( 0.261333735635329 ),
			Max( 20 ), Inc( 1 ), Minor Ticks( 1 )}
		)
	)
);
report(quantile_plot)[axisbox(2)] &amp;lt;&amp;lt; Add Ref Line( threshold, "solid", black, "", 2 );

report(quantile_plot)[axisbox(2)]&amp;lt;&amp;lt;  min(threshold);&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="MikeDereviankin_0-1649011473283.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/41444i476DC0A70993E86B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MikeDereviankin_0-1649011473283.png" alt="MikeDereviankin_0-1649011473283.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:15:09 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-multiple-horizonal-reference-lines-based-on-columns/m-p/475601#M72014</guid>
      <dc:creator>MikeDereviankin</dc:creator>
      <dc:date>2023-06-09T18:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple horizonal reference lines based on columns</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-multiple-horizonal-reference-lines-based-on-columns/m-p/475639#M72016</link>
      <description>&lt;P&gt;Does the reference line appear if you translate or scale the Y axis to decrease the minimum value shown?&amp;nbsp; Since your script sets the min to the same value as the reference line, I would be concerned that numerical issues may cause the reference line to be clipped from view.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Apr 2022 01:41:42 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-multiple-horizonal-reference-lines-based-on-columns/m-p/475639#M72016</guid>
      <dc:creator>danschikore</dc:creator>
      <dc:date>2022-04-04T01:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple horizonal reference lines based on columns</title>
      <link>https://community.jmp.com/t5/Discussions/Adding-multiple-horizonal-reference-lines-based-on-columns/m-p/481655#M72593</link>
      <description>&lt;P&gt;The line needs to be horizontal based on the value that is listed for, 'threshold'. I want these so I can automatically create a data filter and see how this line changes.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 23 Apr 2022 16:08:56 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Adding-multiple-horizonal-reference-lines-based-on-columns/m-p/481655#M72593</guid>
      <dc:creator>MikeDereviankin</dc:creator>
      <dc:date>2022-04-23T16:08:56Z</dc:date>
    </item>
  </channel>
</rss>

