Subscribe Bookmark RSS Feed

Plot two different datasets with different specs

ad

Occasional Contributor

Joined:

Dec 21, 2016

I need help to make a data plot like shown below using JMP GUI preferred, if not then scripting is fine. The red dataset has the orange lines LSL/Target/USL specs whereas the blue datasets has blue lines LSL/Target/USL specs.

 

Capture.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson

Super User

Joined:

Jun 22, 2012

Solution

You would have to do something like this:

doule ref lines.PNG

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
Wait( 0 );
dt2 = dt << subset( selected columns( 0 ), selected rows( 0 ) );

dt:Height << set property( "Spec Limits", { LSL( 55 ), Target( 62 ),USL( 68 )} );
dt2:Height << set property( "Spec Limits", { LSL( 56 ),Target( 63 ), USL( 69 )} );

dt:Weight << set property( "Spec Limits", { LSL( 85 ),Target( 105 ), USL( 145 )} );
dt2:Weight << set property( "Spec Limits", { LSL( 86 ),Target( 106 ), USL( 146 )} );

biv = Bivariate( Y( :height ), X( :weight ) );

Report( biv )[axis box( 1 )] << add ref line( ((dt:Height << get property( "spec limits" ))["LSL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt:Height << get property( "spec limits" ))["USL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt:Height << get property( "spec limits" ))["Target"]), "solid", blue );

Report( biv )[axis box( 1 )] << add ref line( ((dt2:Height << get property( "spec limits" ))["LSL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt2:Height << get property( "spec limits" ))["USL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt2:Height << get property( "spec limits" ))["Target"]), "solid", blue );

Report( biv )[axis box( 2 )] << add ref line( ((dt:Weight << get property( "spec limits" ))["LSL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt:Weight << get property( "spec limits" ))["USL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt:Weight << get property( "spec limits" ))["Target"]), "solid", red );

Report( biv )[axis box( 2 )] << add ref line( ((dt2:Weight << get property( "spec limits" ))["LSL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt2:Weight << get property( "spec limits" ))["USL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt2:Weight << get property( "spec limits" ))["Target"]), "solid", red );

You could specify the "Show Limits(1)" element of the Spec Limits property, but one will still need to create the "Add Ref Line" for the second data table.

Jim
2 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Solution

You would have to do something like this:

doule ref lines.PNG

 

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
Wait( 0 );
dt2 = dt << subset( selected columns( 0 ), selected rows( 0 ) );

dt:Height << set property( "Spec Limits", { LSL( 55 ), Target( 62 ),USL( 68 )} );
dt2:Height << set property( "Spec Limits", { LSL( 56 ),Target( 63 ), USL( 69 )} );

dt:Weight << set property( "Spec Limits", { LSL( 85 ),Target( 105 ), USL( 145 )} );
dt2:Weight << set property( "Spec Limits", { LSL( 86 ),Target( 106 ), USL( 146 )} );

biv = Bivariate( Y( :height ), X( :weight ) );

Report( biv )[axis box( 1 )] << add ref line( ((dt:Height << get property( "spec limits" ))["LSL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt:Height << get property( "spec limits" ))["USL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt:Height << get property( "spec limits" ))["Target"]), "solid", blue );

Report( biv )[axis box( 1 )] << add ref line( ((dt2:Height << get property( "spec limits" ))["LSL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt2:Height << get property( "spec limits" ))["USL"]), "solid", blue );
Report( biv )[axis box( 1 )] << add ref line( ((dt2:Height << get property( "spec limits" ))["Target"]), "solid", blue );

Report( biv )[axis box( 2 )] << add ref line( ((dt:Weight << get property( "spec limits" ))["LSL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt:Weight << get property( "spec limits" ))["USL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt:Weight << get property( "spec limits" ))["Target"]), "solid", red );

Report( biv )[axis box( 2 )] << add ref line( ((dt2:Weight << get property( "spec limits" ))["LSL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt2:Weight << get property( "spec limits" ))["USL"]), "solid", red );
Report( biv )[axis box( 2 )] << add ref line( ((dt2:Weight << get property( "spec limits" ))["Target"]), "solid", red );

You could specify the "Show Limits(1)" element of the Spec Limits property, but one will still need to create the "Add Ref Line" for the second data table.

Jim
ad

Occasional Contributor

Joined:

Dec 21, 2016

Thank you so much for your help. I appreciate it