Here is one method for doing what you want. It envolves splitting the data into separate columns, and then setting spec limits for the split columns. Finally the data are plotted using Graph Builder.
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
dtSplit = dt << Split(
Split By( :sex ),
Split( :height, :weight ),
Remaining Columns( Drop All ),
Sort by Column Property
);
dtSplit:Name("Height F") << set property("spec limits",{LSL( 57 ), USL( 65 ), Show Limits( 1 )});
dtSplit:Name("Height M") << set property("spec limits",{LSL( 60 ), USL( 70 ), Show Limits( 1 )});
Graph Builder(
Variables( X( :weight F ), Y( :height F ), Y( :height M ) ),
Elements(
Position( 1, 1 ),
Points( X, Y, Legend( 57 ) ),
Smoother( X, Y, Legend( 58 ) )
),
Elements(
Position( 1, 2 ),
Points( X, Y, Legend( 59 ) ),
Smoother( X, Y, Legend( 60 ) )
)
);
You could also just specify to add reference lines to the Graph Builder platform, based upon the different spec limits.
Jim