<?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: JSL - Applying the same scale on GraphBuilder with varying number of Pages in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-Applying-the-same-scale-on-GraphBuilder-with-varying-number/m-p/467191#M71104</link>
    <description>&lt;P&gt;You could most likely use Eval(EvalExpr()) with Expr() &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/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; , but I would try to solve this most likely with XPath (or similar method without XPath) because this is more flexible and easier to modify (in my opinion).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is example with Big Class table using :age as page column and modifying x-axis (:weight) min, max and inc. It also has some debug prints and for some reason there are 7 scaleboxes but only 6 groups&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(529, 2957),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Page(:age)),
	Elements(Points(X, Y, Legend(7)), Smoother(X, Y, Legend(8)))
);

Summarize(dt, uniq_groups = by(:age));
Show(N Items(uniq_groups));

rep = Report(gb);
//Show(rep &amp;lt;&amp;lt; Get XML);
scale_boxes = rep &amp;lt;&amp;lt; XPath("//ScaleBox[@charID='weight']");
Show(N Items(scale_boxes)); //this has one extra when compared to groups, not sure (yet) why

scale_boxes &amp;lt;&amp;lt; Min(10);
scale_boxes &amp;lt;&amp;lt; Max(200);
scale_boxes &amp;lt;&amp;lt; Inc(5);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 04 Mar 2022 20:07:17 GMT</pubDate>
    <dc:creator>jthi</dc:creator>
    <dc:date>2022-03-04T20:07:17Z</dc:date>
    <item>
      <title>JSL - Applying the same scale on GraphBuilder with varying number of Pages</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Applying-the-same-scale-on-GraphBuilder-with-varying-number/m-p/467170#M71102</link>
      <description>&lt;P&gt;The snippet's goal below is to plot &lt;FONT face="courier new,courier"&gt;Current&lt;/FONT&gt;&amp;nbsp;against &lt;FONT face="courier new,courier"&gt;Time&lt;/FONT&gt;. I have multiple devices differentiated by &lt;FONT face="courier new,courier"&gt;Serial&lt;/FONT&gt;.&lt;/P&gt;&lt;P&gt;On GraphBuilder, I group the&amp;nbsp;&lt;FONT face="courier new,courier"&gt;Serial&lt;/FONT&gt;&amp;nbsp;by "pages". Since I have a variable number of devices, I have a variable number of pages.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In setting the scale, I have a "dispatch" line per number of page (device) -- so below I have four dispatch lines to update the four charts for each device.&lt;/P&gt;&lt;P&gt;How do I go about implementing the same scale and chart settings across all GraphBuilder pages? Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;//t0 is minimum time
//tn is maximum time
Graph Builder(
	Size(700, 5000),
	Show Control Panel(0),
	Variables(
		X(:Column(Time)),
		Y(:Column(Current)),
		Page(:Serial)
		),
	Elements(
		Points(X, Y(2), Legend(1)),
		Points(X, Y(1), Legend(2))
		),
	SendToReport(
		Dispatch({}, "Time (H)", ScaleBox(2),
			{Min(t0), Max(tn), Inc(inc);}),
		Dispatch({}, "Time (H)", ScaleBox(3),
			{Min(t0), Max(tn), Inc(inc);}),
		Dispatch({}, "Time (H)", ScaleBox(4),
			{Min(t0), Max(tn), Inc(inc);}),
		Dispatch({}, "Time (H)", ScaleBox(5),
			{Min(t0), Max(tn), Inc(inc);})
		);
	);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 18:12:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Applying-the-same-scale-on-GraphBuilder-with-varying-number/m-p/467170#M71102</guid>
      <dc:creator>louiefb</dc:creator>
      <dc:date>2023-06-09T18:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: JSL - Applying the same scale on GraphBuilder with varying number of Pages</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-Applying-the-same-scale-on-GraphBuilder-with-varying-number/m-p/467191#M71104</link>
      <description>&lt;P&gt;You could most likely use Eval(EvalExpr()) with Expr() &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/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; , but I would try to solve this most likely with XPath (or similar method without XPath) because this is more flexible and easier to modify (in my opinion).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below is example with Big Class table using :age as page column and modifying x-axis (:weight) min, max and inc. It also has some debug prints and for some reason there are 7 scaleboxes but only 6 groups&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(529, 2957),
	Show Control Panel(0),
	Variables(X(:weight), Y(:height), Page(:age)),
	Elements(Points(X, Y, Legend(7)), Smoother(X, Y, Legend(8)))
);

Summarize(dt, uniq_groups = by(:age));
Show(N Items(uniq_groups));

rep = Report(gb);
//Show(rep &amp;lt;&amp;lt; Get XML);
scale_boxes = rep &amp;lt;&amp;lt; XPath("//ScaleBox[@charID='weight']");
Show(N Items(scale_boxes)); //this has one extra when compared to groups, not sure (yet) why

scale_boxes &amp;lt;&amp;lt; Min(10);
scale_boxes &amp;lt;&amp;lt; Max(200);
scale_boxes &amp;lt;&amp;lt; Inc(5);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Mar 2022 20:07:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-Applying-the-same-scale-on-GraphBuilder-with-varying-number/m-p/467191#M71104</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-03-04T20:07:17Z</dc:date>
    </item>
  </channel>
</rss>

