BookmarkSubscribe
Choose Language Hide Translation Bar
ad
ad
Community Trekker

Plot two different datasets with different specs

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

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Plot two different datasets with different specs

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
0 Kudos
2 REPLIES 2
txnelson
Super User

Re: Plot two different datasets with different specs

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
0 Kudos
Highlighted
ad
ad
Community Trekker

Re: Plot two different datasets with different specs

Thank you so much for your help. I appreciate it

0 Kudos