<?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: Add vertical lines to Graph Builder in H List Box in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934264#M109027</link>
    <description>&lt;P&gt;I tried to add a screenshot, but Copy/Paste still seems to be broken on the Community&lt;BR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14379"&gt;@Ryan_Gilmore&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;</description>
    <pubDate>Sun, 08 Mar 2026 06:42:13 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2026-03-08T06:42:13Z</dc:date>
    <item>
      <title>Add vertical lines to Graph Builder in H List Box</title>
      <link>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934241#M109025</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I want to put several graphs in a single plot and use the Graph Builder together with V List Box and H List Box. I want to add vertical lines to the plots. I found the &lt;A href="https://community.jmp.com/t5/Discussions/Add-Vertical-Lines-to-Histogram/td-p/523423" target="_self"&gt;example&lt;/A&gt; by &lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14366"&gt;@jthi&lt;/a&gt;,&amp;nbsp;however I get problems as soon as there a several plots.&lt;BR /&gt;&lt;BR /&gt;The example below works with a single plot, but when I uncomment the second plot, I get an additional axis between the plots (see below). How can I fix that?&lt;/P&gt;
&lt;DIV id="tinyMceEditormatthias_bruchh_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");

//gender_list = {"F", "M" };
gender_list = {"F"};

For( i = 1, i &amp;lt; N Items( gender_list ) + 1, i++,
	gender = gender_list[i];
	dt_gender = dt &amp;lt;&amp;lt; Subset(
		Filtered Rows( :sex == gender ),
		Include All Columns//Name :sex 
		);
		
	Match ( gender,
		"F", data = Column ("height"),
		"M", data = Column ("weight")
	);
	
	Match ( gender,
		"F", ref_line = 60,
		"M", ref_line = 100
	);

	plot = New Window ( gender,
		H List Box(
			gb1 = dt_gender &amp;lt;&amp;lt; Graph Builder(
				Size(529, 457),
				Show Control Panel(0),
				Variables(X(data)),
				Elements(Histogram(X, Legend(3)))
			),	
			axisbox = Report(gb1)[AxisBox(1)],
			axisbox &amp;lt;&amp;lt; Add Ref Line(ref_line, "Dotted", red, gender, 2),
			/*gb2 = dt_gender &amp;lt;&amp;lt; Graph Builder(
				Size(529, 457),
				Show Control Panel(0),
				Variables(X(data)),
				Elements(Histogram(X, Legend(3)))
			),	*/
			//axisbox = Report(gb2)[AxisBox(1)],
			//axisbox &amp;lt;&amp;lt; Add Ref Line(ref_line, "Dotted", red, gender, 2),
		),
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="{D9BBC98D-7E75-463D-A174-4831C1E99F5E}.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/95289i86A3B6319E8CBB73/image-size/medium?v=v2&amp;amp;px=400" role="button" title="{D9BBC98D-7E75-463D-A174-4831C1E99F5E&amp;amp;#125;.png" alt="{D9BBC98D-7E75-463D-A174-4831C1E99F5E&amp;amp;#125;.png" /&gt;&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2026 01:41:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934241#M109025</guid>
      <dc:creator>matthias_bruchh</dc:creator>
      <dc:date>2026-03-08T01:41:37Z</dc:date>
    </item>
    <item>
      <title>Re: Add vertical lines to Graph Builder in H List Box</title>
      <link>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934263#M109026</link>
      <description>&lt;P&gt;In New Window, different display objects can be listed by separating them with commas:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;gb = graph Box ();
new window("test",
Text Box ("Hello"),
gb [Axis Box (2)]
)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;creates a new window with the text box and an Axis box.&lt;BR /&gt;&lt;BR /&gt;If you want to add "commands to this list, you have to "close" the commands with ";".&lt;BR /&gt;&lt;BR /&gt;For your case it's:&lt;/P&gt;
&lt;LI-SPOILER&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");

//gender_list = {"F", "M" };
gender_list = {"F"};

For( i = 1, i &amp;lt; N Items( gender_list ) + 1, i++,
	gender = gender_list[i];
	dt_gender = dt &amp;lt;&amp;lt; Subset(
		Filtered Rows( :sex == gender ),
		Include All Columns//Name :sex 
		);
		
	Match ( gender,
		"F", data = Column ("height"),
		"M", data = Column ("weight")
	);
	
	Match ( gender,
		"F", ref_line = 60,
		"M", ref_line = 100
	);

	plot = New Window ( gender,
		H List Box(
			gb1 = dt_gender &amp;lt;&amp;lt; Graph Builder(
				Size(529, 457),
				Show Control Panel(0),
				Variables(X(data)),
				Elements(Histogram(X, Legend(3)))
			),	
			axisbox = Report(gb1)[AxisBox(1)];
			axisbox &amp;lt;&amp;lt; Add Ref Line(ref_line, "Dotted", red, gender, 2);
			gb2 = dt_gender &amp;lt;&amp;lt; Graph Builder(
				Size(529, 457),
				Show Control Panel(0),
				Variables(X(data)),
				Elements(Histogram(X, Legend(3)))
			),	
			axisbox = Report(gb2)[AxisBox(1)];
			axisbox &amp;lt;&amp;lt; Add Ref Line(ref_line, "Dotted", red, gender, 2);
		),
	);
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;.&amp;nbsp;&lt;/P&gt;
&lt;/LI-SPOILER&gt;</description>
      <pubDate>Sun, 08 Mar 2026 10:03:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934263#M109026</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-03-08T10:03:18Z</dc:date>
    </item>
    <item>
      <title>Re: Add vertical lines to Graph Builder in H List Box</title>
      <link>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934264#M109027</link>
      <description>&lt;P&gt;I tried to add a screenshot, but Copy/Paste still seems to be broken on the Community&lt;BR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/14379"&gt;@Ryan_Gilmore&lt;/a&gt;&amp;nbsp;?&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2026 06:42:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934264#M109027</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2026-03-08T06:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: Add vertical lines to Graph Builder in H List Box</title>
      <link>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934265#M109028</link>
      <description>&lt;P&gt;I would suggest moving the code adding reference lines outside of New Window as it is easier (in my opinion) to update and make modifications to (you can also do what hogi suggested).&lt;/P&gt;
&lt;P&gt;Here is initial idea how I would write this (not all of these are basic techniques, but this can give some ideas what can be done)&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");

plot_width = 400;
plot_height = 300;

aa_genders = Associative Array();
aa_genders["F"] = ["data" =&amp;gt; "height", "ref_line" =&amp;gt; 60];
aa_genders["M"] = ["data" =&amp;gt; "weight", "ref_line" =&amp;gt; 100];


For Each({{cur_gender, specs}}, aa_genders,
	dt_gender = dt &amp;lt;&amp;lt; Subset(
		Filtered Rows(:sex == cur_gender),
		Include All Columns,
		Invisible
	);
	
	hlb = H List Box(
		gb1 = dt_gender &amp;lt;&amp;lt; Graph Builder(
			Size(plot_width, plot_height),
			Show Control Panel(0),
			Variables(X(Eval(specs["data"]))),
			Elements(Histogram(X, Legend(3)))
		),
		gb2 = dt_gender &amp;lt;&amp;lt; Graph Builder(
			Size(plot_width, plot_height),
			Show Control Panel(0),
			Variables(X(Eval(specs["data"]))),
			Elements(Histogram(X, Legend(3)))
		)
	);
	
	axisbox = Report(gb1)[AxisBox(1)];
	axisbox &amp;lt;&amp;lt; Add Ref Line(specs["ref_line"], "Dotted", red, cur_gender, 2);
	
	axisbox = Report(gb2)[AxisBox(1)];
	axisbox &amp;lt;&amp;lt; Add Ref Line(specs["ref_line"], "Dotted", red, cur_gender, 2);

	aa_genders[cur_gender]["dt"] = dt_gender;
	aa_genders[cur_gender]["report"] = New Window(cur_gender,
		hlb
	);
);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 08 Mar 2026 07:04:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Add-vertical-lines-to-Graph-Builder-in-H-List-Box/m-p/934265#M109028</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2026-03-08T07:04:07Z</dc:date>
    </item>
  </channel>
</rss>

