<?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: Graph Builder Charts By Variable with different Y axis scales in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279641#M54203</link>
    <description>&lt;P&gt;Here is a simple example that is setting different values for each of the axes for the by groups.&amp;nbsp; If you don't understand how the script is using the Display Trees to change the values, the Display Trees are documented in the Scripting Guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Documentation Library&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/aircraft incidents.jmp" );
dt:Event Date &amp;lt;&amp;lt; set name( "Date" );
dt:Total Uninjured &amp;lt;&amp;lt; set name( "rawValue" );
dt:Engine Type &amp;lt;&amp;lt; set name( "byVariable" );
dt &amp;lt;&amp;lt; New Column( "rawMedian", formula( Col Quantile( :rawValue, .5, :byVariable ) ) );

gb = Graph Builder(
	Size( 800, 500 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables(
		X( :date ),
		Y( :rawValue ),
		Y( :rawMedian ) //It's just a straight horizontal line on each plot
	),
	By( :byVariable )
);

summarize(groups=by(:byVariable));
// loop across the different byVariable values and changes the axes
For(i=1,i&amp;lt;=nitems(groups), i++,
	report(gb[i])[AxisBox(2)]&amp;lt;&amp;lt; max (14-i);
	report(gb[i])[AxisBox(3)] &amp;lt;&amp;lt; min (.6 +.01*i);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 16 Jul 2020 20:57:19 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2020-07-16T20:57:19Z</dc:date>
    <item>
      <title>Graph Builder Charts By Variable with different Y axis scales</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279624#M54198</link>
      <description>&lt;P&gt;All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to modify my Scripted Graph Builder so that it sets various scales for each plot.&lt;/P&gt;&lt;P&gt;I have a table of the (simplified) form:&lt;/P&gt;&lt;P&gt;:date - just a date&lt;/P&gt;&lt;P&gt;:rawValue - some numeric value&lt;/P&gt;&lt;P&gt;:byVariable - several categorical values to separate :rawValues into groups&lt;/P&gt;&lt;P&gt;:rawMedian - just a median value for each of the groups, formula Col Quantile(:rawValue, 0.5, :byVariable)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I plot it this way:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
Size( 800, 500 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( :date ),
Y( :rawValue ),
Y( :rawMedian ) //It's just a straight horizontal line on each plot
),
By( :byVariable )

)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Now, I would like to set the Y axis scale for each plot separately, and be equal, let's say, 3*:rawMedian for that specific :byVariable.&lt;/P&gt;&lt;P&gt;What's the best way of doing this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;M.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Jun 2023 11:03:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279624#M54198</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2023-06-11T11:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder Charts By Variable with different Y axis scales</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279641#M54203</link>
      <description>&lt;P&gt;Here is a simple example that is setting different values for each of the axes for the by groups.&amp;nbsp; If you don't understand how the script is using the Display Trees to change the values, the Display Trees are documented in the Scripting Guide&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help==&amp;gt;Documentation Library&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/aircraft incidents.jmp" );
dt:Event Date &amp;lt;&amp;lt; set name( "Date" );
dt:Total Uninjured &amp;lt;&amp;lt; set name( "rawValue" );
dt:Engine Type &amp;lt;&amp;lt; set name( "byVariable" );
dt &amp;lt;&amp;lt; New Column( "rawMedian", formula( Col Quantile( :rawValue, .5, :byVariable ) ) );

gb = Graph Builder(
	Size( 800, 500 ),
	Show Control Panel( 0 ),
	Show Legend( 0 ),
	Variables(
		X( :date ),
		Y( :rawValue ),
		Y( :rawMedian ) //It's just a straight horizontal line on each plot
	),
	By( :byVariable )
);

summarize(groups=by(:byVariable));
// loop across the different byVariable values and changes the axes
For(i=1,i&amp;lt;=nitems(groups), i++,
	report(gb[i])[AxisBox(2)]&amp;lt;&amp;lt; max (14-i);
	report(gb[i])[AxisBox(3)] &amp;lt;&amp;lt; min (.6 +.01*i);
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jul 2020 20:57:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279641#M54203</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-16T20:57:19Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder Charts By Variable with different Y axis scales</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279651#M54205</link>
      <description>Jim,&lt;BR /&gt;&lt;BR /&gt;Yes, I came to the same conclusion. Only I'm doing a temp summary table for all byVariables and read it into an Associative Array. My data table structure and plots are much more complicated than I showed, that's why. What I'm trying to do now and what I'm struggling with is finding the right AxisBox on my plot.</description>
      <pubDate>Thu, 16 Jul 2020 21:46:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279651#M54205</guid>
      <dc:creator>miguello</dc:creator>
      <dc:date>2020-07-16T21:46:15Z</dc:date>
    </item>
    <item>
      <title>Re: Graph Builder Charts By Variable with different Y axis scales</title>
      <link>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279655#M54206</link>
      <description>Right click on the Outline box for the Graph builder, and select Edit==&amp;gt;Show Tree Structure, then when you click on the axis you are interested in, it will highlight in the tree structure</description>
      <pubDate>Thu, 16 Jul 2020 22:24:08 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Graph-Builder-Charts-By-Variable-with-different-Y-axis-scales/m-p/279655#M54206</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-07-16T22:24:08Z</dc:date>
    </item>
  </channel>
</rss>

