<?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: Dispatch() in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Dispatch/m-p/809416#M98956</link>
    <description>&lt;P&gt;I usually do these with the help of some sort XPath if I cannot easily build it into the graph builder script, as my reports tend to be quite dynamic&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(528, 2954),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Page(:age)),
	Elements(Points(X, Y, Legend(5)), Smoother(X, Y, Legend(6)))
);

rep = Report(gb);
gbb_names = rep &amp;lt;&amp;lt; XPath("//GraphBuilderGroupBox/text()");

group_number = Contains(gbb_names, "age = 14");
abs = Report(gb) &amp;lt;&amp;lt; XPath("//AxisBox");
abs[group_number*2] &amp;lt;&amp;lt; Add Ref Line(80, "Solid", "Black", "", 1);

// or possibly with dispatch you could do something like this
group_number = Contains(gbb_names, "age = 16");
rep &amp;lt;&amp;lt; Dispatch({}, "weight", ScaleBox(group_number + 1),
	{Add Ref Line(110, "Solid", "Black", "", 1)}
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 31 Oct 2024 21:42:03 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2024-10-31T21:42:03Z</dc:date>
    <item>
      <title>Dispatch()</title>
      <link>https://community.jmp.com/t5/Discussions/Dispatch/m-p/809413#M98954</link>
      <description>&lt;P&gt;I want to add reference lines to a graph, but only if the page has :name = "Closed Loop Control". The only way I have found to be successful is to grab it sequentially using the highlighted scalebox(5), however I want to grab it by the :name instead.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="closed loop.png" style="width: 985px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/69739iED923CF56606825C/image-size/large?v=v2&amp;amp;px=999" role="button" title="closed loop.png" alt="closed loop.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 21:06:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dispatch/m-p/809413#M98954</guid>
      <dc:creator>Jdho3</dc:creator>
      <dc:date>2024-10-31T21:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Dispatch()</title>
      <link>https://community.jmp.com/t5/Discussions/Dispatch/m-p/809416#M98956</link>
      <description>&lt;P&gt;I usually do these with the help of some sort XPath if I cannot easily build it into the graph builder script, as my reports tend to be quite dynamic&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1); 

dt = open("$SAMPLE_DATA/Big Class.jmp");

gb = dt &amp;lt;&amp;lt; Graph Builder(
	Size(528, 2954),
	Show Control Panel(0),
	Variables(X(:height), Y(:weight), Page(:age)),
	Elements(Points(X, Y, Legend(5)), Smoother(X, Y, Legend(6)))
);

rep = Report(gb);
gbb_names = rep &amp;lt;&amp;lt; XPath("//GraphBuilderGroupBox/text()");

group_number = Contains(gbb_names, "age = 14");
abs = Report(gb) &amp;lt;&amp;lt; XPath("//AxisBox");
abs[group_number*2] &amp;lt;&amp;lt; Add Ref Line(80, "Solid", "Black", "", 1);

// or possibly with dispatch you could do something like this
group_number = Contains(gbb_names, "age = 16");
rep &amp;lt;&amp;lt; Dispatch({}, "weight", ScaleBox(group_number + 1),
	{Add Ref Line(110, "Solid", "Black", "", 1)}
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 31 Oct 2024 21:42:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Dispatch/m-p/809416#M98956</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2024-10-31T21:42:03Z</dc:date>
    </item>
  </channel>
</rss>

