Hello,
I am writing a very simple script for using the Control Graph Builder.
Upon running the script below, I will have 2 graphs popping up in two different windows.
Example shown below:
Control Chart Builder(
Size( 903, 464 ),
Show Control Panel( 0 ),
Variables(
Subgroup( :Name( "MoveOutTime" ) ),
Y( :Current1 )
),
Chart(
Position( 1 ),
Points( Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) ),
Add Spec Limits( {LSL( 2.3 )} )
),
Chart(
Position( 2 ),
Points( Statistic( "Moving Range on Means" ), Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) )
),
SendToReport(
Dispatch(
{},
"MoveOutTime",
ScaleBox,
{Min( -0.5 ), Max( 528.5 ), Interval( "Numeric" ), Inc( 0.5 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"Current1",
ScaleBox,
{Add Ref Line( 2.3, "Solid", "Blue", "LSL", 1 )}
),
Dispatch(
{},
"Current1 Limit Summaries",
OutlineBox,
{OutlineCloseOrientation( "Vertical" )}
)
)
);
Control Chart Builder(
Size( 903, 464 ),
Show Control Panel( 0 ),
Variables(
Subgroup( :Name( "MoveOutTime" ) ),
Y( :Current2 )
),
Chart(
Position( 1 ),
Points( Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) ),
Add Spec Limits( {LSL( 3.1 )} )
),
Chart(
Position( 2 ),
Points( Statistic( "Moving Range on Means" ), Individual Points( 1 ) ),
Limits( Sigma( "Moving Range" ), Zones( 1 ) ),
Warnings( Test Beyond Limits( 1 ) )
),
SendToReport(
Dispatch(
{},
"MoveOutTime",
ScaleBox,
{Min( -0.5 ), Max( 528.5 ), Interval( "Numeric" ), Inc( 0.5 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"Current2",
ScaleBox,
{Add Ref Line( 3.1, "Solid", "Blue", "LSL", 1 )}
),
Dispatch(
{},
"Current2 Limit Summaries",
OutlineBox,
{OutlineCloseOrientation( "Vertical" )}
)
)
);
(1) How can I put these two graphs together so that both of them can appear together in a JMP Journal ?
(2) What should I do if I have multiple current parameters- how should I loop all these parameters so that eventually they will appear on the same window of a JMP Journal ?
Thank you in advance for the advice.
1. I can think of several approaches.
- Send the << Journal message to each separate platform.
- Put both responses in the Y role of the launch code.
- Put the separate launch code above inside the New Window( "Charts", ccb1, ccb2 ) function as arguments.
2. I have not tested this code but the general idea is to break up the fixed part (e.g., ccb expr in this case) and the variable part (e.g., y arg in this case). Use expressions to make the final code and then evaluate it.
Names Default to Here( 1 );
column = List( /* a list of columns to chart */ );
ccb expr = Expr( Control Chart Builder( /* all arguments except for Y() */ ) );
y arg = Expr( Y() );
For( col = 1, col <= N Items( columns ), col++,
Insert Into( y arg, Column( column[col] ) );
);
Eval(
Insert( ccb expr, Name Expr)( y arg )
);
@markbailey 's approach is a solid one.
I just posted a blog that uses that idea and has some larger examples of graphs assembled into a "dashboard"