This is one way how it could work:
Virtually link both tables (e.g. Table1 contains references to Table2 columns),
and generate the graph.
Tested with JMP16 on Win10.
Names Default To Here( 1 );
dt1 = New Table( "Table1",
Add Rows( 4 ),
Compress File When Saved( 1 ),
New Column( "Link", Numeric, "Continuous", Format( "Best", 12 ), Set Selected, Set Values( [1, 2, 3, 4] ) ),
New Column( "force", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [50, 60, 40, 50] ) ),
New Column( "temp", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [88, 70, 89, 88] ) ),
New Column( "pressure", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [2, 1, 3, 1] ) ),
New Column( "level", Character( 16 ), "Nominal", Set Values( {"-", "-", "-", "-"} ) )
);
dt2 = New Table( "Table2",
Add Rows( 4 ),
Compress File When Saved( 1 ),
New Column( "Link", Numeric, "Continuous", Format( "Best", 12 ), Set Selected, Set Values( [1, 2, 3, 4] ) ),
New Column( "force", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [50, 60, 40, 50] ) ),
New Column( "temp", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [88, 70, 89, 88] ) ),
New Column( "pressure", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [2, 1, 3, 1] ) ),
New Column( "time", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [5, 6, 15, 4] ) ),
New Column( "level", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [3, 4, 5, 4] ) )
);
// to get link working, save is needed
dt1 << save( "$TEMP\" || (dt1 << get name()) || ".jmp" );
dt2 << save( "$TEMP\" || (dt2 << get name()) || ".jmp" );
dt2:LInk << set property( "Link ID", 1 );
dt1:Link << set Property( "Link Reference", {Reference Table( dt2 )} );
dt1 << Add Properties to Table(
{New Script(
"force & 4 more vs. Link",
Graph Builder(
Size( 514, 444 ),
Show Control Panel( 0 ),
Graph Spacing( 5 ),
Variables(
X( :Link ),
Y( :force ),
Y( :temp, Position( 1 ) ),
Y( :pressure, Position( 1 ) ),
Y( Referenced Column( "time[Link]", Reference( Column( :Link ), Reference( Column( :time ) ) ) ) ),
Y( Referenced Column( "level[Link]", Reference( Column( :Link ), Reference( Column( :level ) ) ) ), Position( 2 ) )
),
Elements( Position( 1, 1 ), Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 65 ) ), Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 66 ) ) ),
Elements( Position( 1, 2 ), Points( X, Y( 1 ), Y( 2 ), Legend( 67 ) ), Smoother( X, Y( 1 ), Y( 2 ), Legend( 68 ) ) )
)
)}
);
dt1 << run script( "force & 4 more vs. Link" );
Georg