Here is my example. Does it work on your copy of JMP.
names default to here(1);
dt = Open("$SAMPLE_DATA/big class.jmp");
dt << Graph Builder(
Legend Position( "Inside Right" ),
Variables( X( :age ), Y( :height ), Overlay( :sex ) ),
Elements( Bar( X, Y, Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
"height",
ScaleBox,
{Min( 0 ), Max( 125.6145 ), Inc( 20 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Fill Color( 0 )}, Item ID( "F", 1 ) ),
Properties(
1,
{Fill Color( 1 ), Fill Pattern( "hatch medium" )},
Item ID( "M", 1 )
)
)}
),
Dispatch( {}, "400", LegendBox, {Set Title( "" )} )
)
)
Jim