News
On June 1, we’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
Choose Language Hide Translation Bar
Highlighted
Ann_JMP_User
Level III

How to script different graphs into a same windom using JSL

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.

 

0 Kudos
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted

Re: How to script different graphs into a same windom using JSL

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 )
);
Learn it once, use it forever!

View solution in original post

0 Kudos
Highlighted
Byron_JMP
Staff

Re: How to script different graphs into a same windom using JSL

@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"

 

JMP Systems Engineer, Pharm and BioPharm Sciences

View solution in original post

0 Kudos
2 REPLIES 2
Highlighted

Re: How to script different graphs into a same windom using JSL

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 )
);
Learn it once, use it forever!

View solution in original post

0 Kudos
Highlighted
Byron_JMP
Staff

Re: How to script different graphs into a same windom using JSL

@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"

 

JMP Systems Engineer, Pharm and BioPharm Sciences

View solution in original post

0 Kudos