<?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 can i plot multiple reference lines with different values ? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-can-i-plot-multiple-reference-lines-with-different-values/m-p/425932#M67552</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With graph builder I'm trying to put multiple reference lines with different values on a same plot but divided in to different groups. I'm displaying different plots on these groups and want to set limits with different reference lines.&amp;nbsp;&lt;BR /&gt;I'm able to put ref lines on both X and Y axis but getting same line on all group of plots.&amp;nbsp;&lt;BR /&gt;Need help here&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 865, 686 ),
	Variables(
		X( :total_attenuation_db ),
		Y(
			Transform Column(
				"Transform[rate_kbits_sec]",
				Continuous,
				Formula( Num( :rate_kbits_sec ) )
			)
		),
		Group X( :iperf_protocol ),
		Group Y( :bw_mhz ),
		Overlay( :run_tag )
	),
	Elements(
		Line( X, Y, Legend( 6 ) ),
		Points( X, Y, Legend( 7 ) ),
		Caption Box( X, Y, Legend( 8 ), Summary Statistic( "Max" ) )
	),
	SendToReport(
		Dispatch(
			{},
			"total_attenuation_db",
			ScaleBox,
			{Add Ref Line( 94, "Dashed", "Medium Dark Red", "Limit", 2 )}
		),
		Dispatch(
			{},
			"Transform[rate_kbits_sec]",
			ScaleBox,
			{Min( 0 ), Max( 22821.89167292 ), Inc( 1000 ), Minor Ticks( 1 ),
			Add Ref Line( 10000, "Dashed", "Medium Dark Red", "Min Limit ", 2 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jun 2023 18:02:22 GMT</pubDate>
    <dc:creator>mati</dc:creator>
    <dc:date>2023-06-09T18:02:22Z</dc:date>
    <item>
      <title>How can i plot multiple reference lines with different values ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-i-plot-multiple-reference-lines-with-different-values/m-p/425932#M67552</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With graph builder I'm trying to put multiple reference lines with different values on a same plot but divided in to different groups. I'm displaying different plots on these groups and want to set limits with different reference lines.&amp;nbsp;&lt;BR /&gt;I'm able to put ref lines on both X and Y axis but getting same line on all group of plots.&amp;nbsp;&lt;BR /&gt;Need help here&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 865, 686 ),
	Variables(
		X( :total_attenuation_db ),
		Y(
			Transform Column(
				"Transform[rate_kbits_sec]",
				Continuous,
				Formula( Num( :rate_kbits_sec ) )
			)
		),
		Group X( :iperf_protocol ),
		Group Y( :bw_mhz ),
		Overlay( :run_tag )
	),
	Elements(
		Line( X, Y, Legend( 6 ) ),
		Points( X, Y, Legend( 7 ) ),
		Caption Box( X, Y, Legend( 8 ), Summary Statistic( "Max" ) )
	),
	SendToReport(
		Dispatch(
			{},
			"total_attenuation_db",
			ScaleBox,
			{Add Ref Line( 94, "Dashed", "Medium Dark Red", "Limit", 2 )}
		),
		Dispatch(
			{},
			"Transform[rate_kbits_sec]",
			ScaleBox,
			{Min( 0 ), Max( 22821.89167292 ), Inc( 1000 ), Minor Ticks( 1 ),
			Add Ref Line( 10000, "Dashed", "Medium Dark Red", "Min Limit ", 2 )}
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:02:22 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-i-plot-multiple-reference-lines-with-different-values/m-p/425932#M67552</guid>
      <dc:creator>mati</dc:creator>
      <dc:date>2023-06-09T18:02:22Z</dc:date>
    </item>
    <item>
      <title>Re: How can i plot multiple reference lines with different values ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-i-plot-multiple-reference-lines-with-different-values/m-p/426055#M67567</link>
      <description>&lt;P&gt;Any form of grouping within Graph Builder will result in reference line being shared between groups.&amp;nbsp; That is, if there is X grouping, reference lines on the Y axis will flow across all X groups.&lt;/P&gt;
&lt;P&gt;The only way that I know of to avoid this, is to generate separate Graph Builder instances, and then have JMP group the resulting instances of Graph Builder.&amp;nbsp; You can accomplish this by subsetting the data table into the rows you need for each graph.&amp;nbsp; Then run Graph Builder on each of the subsets, and place them into a New Window() for the display.&amp;nbsp; You can also use Where Clause processing within a Single Graph Builder instance, and get similar results.&amp;nbsp; Below is an example of that using the Big Class data table.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1634136015967.png" style="width: 1063px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/36534i875F57273F6F67DE/image-dimensions/1063x389?v=v2" width="1063" height="389" role="button" title="txnelson_0-1634136015967.png" alt="txnelson_0-1634136015967.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
New Window( "graphs",
	Lineup Box( N Col( 6 ), 

		Graph Builder(
			SendToByGroup( {:sex == "F", :age == 12} ),
			Size( 289, 238 ),
			Show Control Panel( 0 ),
			Variables( X( :weight ), Y( :height ) ),
			Elements( Points( X, Y, Legend( 1 ) ) ),
			By(  :sex,:age ),
			SendToByGroup(
				{:sex == "F", :age == 12},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=F, age=12"},
						"weight",
						ScaleBox,
						{Add Ref Line( 105, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=F, age=12"},
						"height",
						ScaleBox,
						{Add Ref Line( 59, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "F", :age == 13},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=F, age=13"},
						"weight",
						ScaleBox,
						{Add Ref Line( 90, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=F, age=13"},
						"height",
						ScaleBox,
						{Add Ref Line( 55, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "F", :age == 14},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=F, age=14"},
						"weight",
						ScaleBox,
						{Add Ref Line( 111.5, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=F, age=14"},
						"height",
						ScaleBox,
						{Add Ref Line( 63, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "F", :age == 15},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=F, age=15"},
						"weight",
						ScaleBox,
						{Add Ref Line( 102, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=F, age=15"},
						"height",
						ScaleBox,
						{Min( 55.0888655110677 ), Max( 64.901549594752 ), Inc( 2 ),
						Minor Ticks( 1 ), Add Ref Line( 57, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "F", :age == 16},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=F, age=16"},
						"weight",
						ScaleBox,
						{Add Ref Line( 113.5, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=F, age=16"},
						"height",
						ScaleBox,
						{Add Ref Line( 62.5, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "F", :age == 17},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=F, age=17"},
						"weight",
						ScaleBox,
						{Add Ref Line( 116, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=F, age=17"},
						"height",
						ScaleBox,
						{Add Ref Line( 62, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "M", :age == 12},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=M, age=12"},
						"weight",
						ScaleBox,
						{Add Ref Line( 103.52, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=M, age=12"},
						"height",
						ScaleBox,
						{Add Ref Line( 56, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "M", :age == 13},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=M, age=13"},
						"weight",
						ScaleBox,
						{Add Ref Line( 92, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=M, age=13"},
						"height",
						ScaleBox,
						{Add Ref Line( 61.5, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "M", :age == 14},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=M, age=14"},
						"weight",
						ScaleBox,
						{Add Ref Line( 105.04, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=M, age=14"},
						"height",
						ScaleBox,
						{Add Ref Line( 66, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "M", :age == 15},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=M, age=15"},
						"weight",
						ScaleBox,
						{Add Ref Line( 116.52, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=M, age=15"},
						"height",
						ScaleBox,
						{Add Ref Line( 64.5, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "M", :age == 16},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=M, age=16"},
						"weight",
						ScaleBox,
						{Add Ref Line( 128, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=M, age=16"},
						"height",
						ScaleBox,
						{Add Ref Line( 68, "Solid", "Black", "", 1 )}
					)
				)
			),
			SendToByGroup(
				{:sex == "M", :age == 17},
				SendToReport(
					Dispatch(
						{"Graph Builder sex=M, age=17"},
						"weight",
						ScaleBox,
						{Add Ref Line( 153.74, "Solid", "Black", "", 1 )}
					),
					Dispatch(
						{"Graph Builder sex=M, age=17"},
						"height",
						ScaleBox,
						{Add Ref Line( 69, "Solid", "Black", "", 1 )}
					)
				)
			)
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Oct 2021 14:41:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-i-plot-multiple-reference-lines-with-different-values/m-p/426055#M67567</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2021-10-13T14:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: How can i plot multiple reference lines with different values ?</title>
      <link>https://community.jmp.com/t5/Discussions/How-can-i-plot-multiple-reference-lines-with-different-values/m-p/426261#M67607</link>
      <description>Thanks, i'll give it a try</description>
      <pubDate>Thu, 14 Oct 2021 06:16:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-can-i-plot-multiple-reference-lines-with-different-values/m-p/426261#M67607</guid>
      <dc:creator>mati</dc:creator>
      <dc:date>2021-10-14T06:16:34Z</dc:date>
    </item>
  </channel>
</rss>

