Excellent, that worked! I think I was missing the extra X variable when I added the color spec. It would be nice if GB supported this with the UI, but it already does so much...
Here's the final script I was looking for:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
Size( 934, 824 ),
Show Title( 1 ),
Graph Spacing( 20 ),
Variables(
X( :sex ),
X( :sex ),
X( :sex ),
Y( :age ),
Color( :height, Summary Statistic( "Min" ) ),
Color( :height, Summary Statistic( "Mean" ) ),
Color( :height, Summary Statistic( "Max" ) )
),
Elements(
Position( 1, 1 ),
Heatmap( X, Y, Color( 1 ), Legend( 1 ), Label( "Label by Value" ) )
),
Elements(
Position( 2, 1 ),
Heatmap( X, Y, Color( 2 ), Legend( 2 ), Label( "Label by Value" ) )
),
Elements(
Position( 3, 1 ),
Heatmap( X, Y, Color( 3 ), Legend( 3 ), Label( "Label by Value" ) )
),
SendToReport(
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( "Age vs. Sex, Colored on Height -- Min, Mean, Max" )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {1, [0], 2, [-1], 3, [-1]} )}
)
)
)