<?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: Plotting with lower and upper limits in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Plotting-with-lower-and-upper-limits/m-p/649012#M84154</link>
    <description>&lt;P&gt;Two items&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Your ul list has character values instead of numeric values
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ul = {11.5, "20", "100"};&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;You need to check to see if your cmax and cmin are outside of your ul and sl values and if so, then reset their values.
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Try( cmin = rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Get Min() );
		Try( cmax = rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Get Max() );
		
		range = abs(cmax-cmin);
		if(sl&amp;lt;cmin, cmin =sl-.1*range);
		if(ul&amp;gt;cmax,cmax=ul+.1*range);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Thu, 22 Jun 2023 10:20:44 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2023-06-22T10:20:44Z</dc:date>
    <item>
      <title>Plotting with lower and upper limits</title>
      <link>https://community.jmp.com/t5/Discussions/Plotting-with-lower-and-upper-limits/m-p/648974#M84152</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I have a function that creates cdf plots with lower and upper limits. However, when applied, the lower/upper limits are not being shown because of the axis minimum and maximum. What/how is the proper computation in order for the lower and upper limit to be shown from the plots?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is my sample function:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;cdfplot = Function( {ycol, sl, ul}, {plot}, 
									
					cdf = Oneway( Y( Column( ycol ) ), X( :Lot ), Means and Std Dev( 1 ), Box Plots( 1 ), Mean Diamonds( 1 ), Mean Error Bars( 1 ),
					Std Dev Lines( 1 ), Comparison Circles( 0 ), Connect Means( 1 ), X Axis Proportional( 0 ), Points Jittered( 1 ), Grand Mean( 0 ));
					rcdf = cdf &amp;lt;&amp;lt; report;
					
					//Convert rcdf to list if not list
					If( Not( Is List( rcdf ) ),
							rcdf = Eval List({rcdf});
						);
					
					//Apply customization to cdf								
					For( s = 1, s &amp;lt;= Nitems(rcdf), s++,
					
						Try( cmin = rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Get Min() );
						Try( cmax = rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Get Max() );
	
						rcdf[s][FrameBox( 1 )] &amp;lt;&amp;lt; {Frame Size( 380, 250 ), Marker Size( 3 ), Line Width Scale( 1.5 )};
						rcdf[s][Text Edit Box( 1 )] &amp;lt;&amp;lt; Set Font Size( 10 ) &amp;lt;&amp;lt; Set Font Style( "Bold" );
						rcdf[s][Text Edit Box( 2 )] &amp;lt;&amp;lt; Set Font Size( 10 ) &amp;lt;&amp;lt; Set Font Style( "Bold" );
						rcdf[s][axis box( 2 )] &amp;lt;&amp;lt; Format( "Best", 12 ) &amp;lt;&amp;lt; Tick Font( style( 1 ), size( 9 ) ) &amp;lt;&amp;lt; Show major Grid( 1 ) &amp;lt;&amp;lt; Show Minor Grid( 1 ) &amp;lt;&amp;lt;
						Show Minor Ticks( 1 ) &amp;lt;&amp;lt; Minor Ticks( 4 );
						Try( rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Max(cmax) &amp;lt;&amp;lt; Min(cmin) &amp;lt;&amp;lt; Inc() &amp;lt;&amp;lt; Minor Ticks( 1 ) );
						rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Format( "Best", 12 ) &amp;lt;&amp;lt; Tick Font( style( 1 ), size( 9 ) ) &amp;lt;&amp;lt; Show major Grid( 1 ) &amp;lt;&amp;lt; Show Minor Grid( 1 ) &amp;lt;&amp;lt;
						Show Minor Ticks( 1 ) &amp;lt;&amp;lt; Minor Ticks( 4 );
						rcdf[s][Scale box ( 3 )] &amp;lt;&amp;lt; Add Ref Line( ul, "Solid", "Red", "USL", 2 ) &amp;lt;&amp;lt; Add Ref Line( sl, "Solid", "Red", "LSL", 2 );
					);
					plot = rcdf;
);


//Function application
colname = {"AVG_1", "AVG_2", "AVG_3"};
ul = {11.5, "20", "100"};
ll = {8, 0.1, 6 };

lb = Lineup Box( N Col(4) );
For( i = 1, i &amp;lt;= N Items( colname ), i++,
	lb &amp;lt;&amp;lt; Append( H List Box( cdfplot( colname[i], ll[i], ul[i] ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I have this plot as the result:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UserID16644_0-1687423292135.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54012i60375FDCE4C10A3E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UserID16644_0-1687423292135.png" alt="UserID16644_0-1687423292135.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it should be like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="UserID16644_2-1687423343796.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/54014i84C34A02A33AC39F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="UserID16644_2-1687423343796.png" alt="UserID16644_2-1687423343796.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2023 08:43:47 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plotting-with-lower-and-upper-limits/m-p/648974#M84152</guid>
      <dc:creator>UserID16644</dc:creator>
      <dc:date>2023-06-22T08:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: Plotting with lower and upper limits</title>
      <link>https://community.jmp.com/t5/Discussions/Plotting-with-lower-and-upper-limits/m-p/649012#M84154</link>
      <description>&lt;P&gt;Two items&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Your ul list has character values instead of numeric values
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ul = {11.5, "20", "100"};&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/LI&gt;
&lt;LI&gt;You need to check to see if your cmax and cmin are outside of your ul and sl values and if so, then reset their values.
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Try( cmin = rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Get Min() );
		Try( cmax = rcdf[s][axis box( 1 )] &amp;lt;&amp;lt; Get Max() );
		
		range = abs(cmax-cmin);
		if(sl&amp;lt;cmin, cmin =sl-.1*range);
		if(ul&amp;gt;cmax,cmax=ul+.1*range);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 22 Jun 2023 10:20:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Plotting-with-lower-and-upper-limits/m-p/649012#M84154</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2023-06-22T10:20:44Z</dc:date>
    </item>
  </channel>
</rss>

