Hi all,
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?
Here is my sample function:
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 << 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 <= Nitems(rcdf), s++,
Try( cmin = rcdf[s][axis box( 1 )] << Get Min() );
Try( cmax = rcdf[s][axis box( 1 )] << Get Max() );
rcdf[s][FrameBox( 1 )] << {Frame Size( 380, 250 ), Marker Size( 3 ), Line Width Scale( 1.5 )};
rcdf[s][Text Edit Box( 1 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
rcdf[s][Text Edit Box( 2 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
rcdf[s][axis box( 2 )] << Format( "Best", 12 ) << Tick Font( style( 1 ), size( 9 ) ) << Show major Grid( 1 ) << Show Minor Grid( 1 ) <<
Show Minor Ticks( 1 ) << Minor Ticks( 4 );
Try( rcdf[s][axis box( 1 )] << Max(cmax) << Min(cmin) << Inc() << Minor Ticks( 1 ) );
rcdf[s][axis box( 1 )] << Format( "Best", 12 ) << Tick Font( style( 1 ), size( 9 ) ) << Show major Grid( 1 ) << Show Minor Grid( 1 ) <<
Show Minor Ticks( 1 ) << Minor Ticks( 4 );
rcdf[s][Scale box ( 3 )] << Add Ref Line( ul, "Solid", "Red", "USL", 2 ) << 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 <= N Items( colname ), i++,
lb << Append( H List Box( cdfplot( colname[i], ll[i], ul[i] ) ) )
);
I have this plot as the result:
But it should be like this: