Here is an example that somewhat resembles your 2 data table input that needs to be put together into one plot. You need to study the script, and then take the new information and apply it back onto your scripts.
Here is the script
Names Default To Here( 1 );
dt = Open( "$sample_data/semiconductor capability.jmp" );
// Create 2 Data tables to mimic the Discussion Question situation
dt1 = dt << subset( columns(Wafer, Site, NPN1), selected rows(0));
dt2 = dt << subset( columns(lot_id, Wafer, Site, NPN2), selected rows(0));
// Select rows wanted from table dt1
dt1 << select where( :wafer <= 10 );
// Create new subset of selected rows
dt1Final = dt1 << subset( selected rows( 1 ), selected columns( 0 ) );
// Select rows wanted from table dt2
dt2 << select where( contains( {"lot01", "lot02"}, :lot_id ));
// Create new subset of selected rows
dt2Final = dt2 << subset( selected rows( 1 ), selected columns( 0 ) );
// put the data together
dtTogether = dt1Final << concatenate( dt2Final );
gb = Graph Builder(
Size( 534, 450 ),
Show Control Panel( 0 ),
Variables( X( :wafer ), Y( :NPN1 ), Y( :NPN2, Position( 1 ) ) ),
Elements( Points( X, Y( 1 ), Y( 2 ), Legend( 5 ) ) )
);
theReport = report(gb);
// Create the reference lines
theYColList = { "NPN1", "NPN2" };
For( i = 1, i <= N Items( theYColList ),i++,
specs = Column( theYColList[i] ) << get property( "spec limits" );
If( Try( specs["USL"], "" ) != "",
theReport[AxisBox( 2 )] << Add Ref Line( specs["USL"], "Dashed", black, theYColList[i] || " USL" )
);
If( Try( specs["LSL"], "" ) != "",
theReport[AxisBox( 2 )] << Add Ref Line( specs["LSL"], "Dashed", black, theYColList[i] || " LSL" )
);
If( Try( specs["Target"], "" ) != "",
theReport[AxisBox( 2 )] << Add Ref Line( specs["Target"], "Dashed", black, theYColList[i] || " Target" )
);
);
Jim