"no JSL" - but here it is:
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// via right click - new formula column
New Column( "Mean[height][sex]", Formula( Col Mean( :height, :sex ) ));
Graph Builder(
Variables(
X( :height ),
X( :"Mean[height][sex]"n, Position( 1 ) ),
Y( :weight ),
Group Y( :sex ),
Color( :sex )
),
Elements(
Points( X( 1 ), Y),
Smoother( X( 1 ), Y ),
Bar( X( 2 ), Bar Style( "Float" ), Response Axis( "X" ) )
)
);