<?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 to Set Graph Y axis Max Value based on Cell Value in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/JSL-to-Set-Graph-Y-axis-Max-Value-based-on-Cell-Value/m-p/314929#M56702</link>
    <description>&lt;P&gt;Thanks Jim.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 12:42:25 GMT</pubDate>
    <dc:creator>Lino</dc:creator>
    <dc:date>2020-09-30T12:42:25Z</dc:date>
    <item>
      <title>JSL to Set Graph Y axis Max Value based on Cell Value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-Set-Graph-Y-axis-Max-Value-based-on-Cell-Value/m-p/314517#M56644</link>
      <description>&lt;P&gt;I am plotting graph and add refence line. I would like the reference line and Y max axis value can be seen on the graph. I am trying to set the Y axis max value based on the max cell value.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I do not see the Y max appear in the graph.&lt;/P&gt;&lt;P&gt;Below is my script. Can anyone advise what wrong with the script?&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt= Current Data Table();

MX = Max(:Weight);
If(
	MX &amp;lt; 80, 
	    MX = 90; 
	    MX = MX + 10
);

dt &amp;lt;&amp;lt; Overlay Plot(
	X( :WW ),
	Y( :Weight ),
	Y Axis[1] &amp;lt;&amp;lt; {{Max( MX ), Minor Ticks( 1 ),
	Add Ref Line( 80, "Solid", "Red", "", 1 )}},
	Separate Axes( 1 ),
	Connect Thru Missing( 1 ),
	
		Dispatch(
			{},
			"106",
			ScaleBox,
			{Max( MX ), Minor Ticks( 1 ),
			Add Ref Line( 80, "Solid", "Red", "", 1 )}
		),
		Dispatch(
			{},
			"101",
			ScaleBox,
			{Min(0), Max( 11 ), Inc( 1 ), Minor Ticks( 1 )}
		)
	
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 09 Jun 2023 23:39:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-Set-Graph-Y-axis-Max-Value-based-on-Cell-Value/m-p/314517#M56644</guid>
      <dc:creator>Lino</dc:creator>
      <dc:date>2023-06-09T23:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to Set Graph Y axis Max Value based on Cell Value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-Set-Graph-Y-axis-Max-Value-based-on-Cell-Value/m-p/314584#M56653</link>
      <description>&lt;P&gt;The Overlay plot has been depreciated.&amp;nbsp; One should be using the Graph Builder for this type of graphic.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="overlay.PNG" style="width: 638px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/27063i662999B3601E86F5/image-size/large?v=v2&amp;amp;px=999" role="button" title="overlay.PNG" alt="overlay.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here is the script for the graph above&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt= Current Data Table();

MX = col Max(:Weight);
If(
	MX &amp;lt; 80, 
	    MX = 90,
	    MX = MX + 10
);

gb = dt &amp;lt;&amp;lt;Graph Builder(
	Size( 534, 456 ),
	Show Control Panel( 0 ),
	Variables( X( :WW ), Y( :Weight ) ),
	Elements( Line( X, Y, Legend( 16 ) ), Points( X, Y, Legend( 17 ) ) )
);
report(gb)[AxisBox(2)] &amp;lt;&amp;lt; max(MX) &amp;lt;&amp;lt; add ref line( 80, "Solid", "Red", "", 1 );
report(gb)[AxisBox(1)] &amp;lt;&amp;lt; min(0) &amp;lt;&amp;lt; max(11) &amp;lt;&amp;lt; incr(1);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:58:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-Set-Graph-Y-axis-Max-Value-based-on-Cell-Value/m-p/314584#M56653</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-09-29T14:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: JSL to Set Graph Y axis Max Value based on Cell Value</title>
      <link>https://community.jmp.com/t5/Discussions/JSL-to-Set-Graph-Y-axis-Max-Value-based-on-Cell-Value/m-p/314929#M56702</link>
      <description>&lt;P&gt;Thanks Jim.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 12:42:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/JSL-to-Set-Graph-Y-axis-Max-Value-based-on-Cell-Value/m-p/314929#M56702</guid>
      <dc:creator>Lino</dc:creator>
      <dc:date>2020-09-30T12:42:25Z</dc:date>
    </item>
  </channel>
</rss>

