Here's the function:
bivht = Function( {x_param, y_param, htt},
biv = Bivariate(
Y( Column( y_param ) ),
X( Column( x_param ) ),
GroupBy( Column( ht ) ),
<<Fit Spline( 1000, {Line Width( 2 )} )
);
rbiv = biv << Report;
rbiv[Framebox( 1 )] << {Marker Size( 3 )};
rbiv[Axisbox( 2 )] << Tick Font( style( 0 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) <<
Show Minor Ticks( 1 );
rbiv[Axisbox( 1 )] << Tick Font( style( 0 ), size( 9 ) ) << Show Major Grid( 1 ) << Show Minor Grid( 1 ) <<
Show Minor Ticks( 1 );
rbiv[Text Edit Box( 2 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
rbiv[Text Edit Box( 1 )] << Set Font Size( 10 ) << Set Font Style( "Bold" );
rbiv[Outline Box( 1 )] << Set Title( y_param || " by " || x_param );
rbiv["Smoothing Spline Fit, lambda=1000 ?"] << Close All Like This;
rbiv[Framebox( 1 )] << Row Legend(
Column( ht ),
Color( 1 ),
Marker( 0 ),
Color Theme( "JMP Default" ),
Continuous Scale( 0 )
);
rbiv[Border Box( 2 )] << Delete;
pbiv = rbiv[Outline Box( 1 )] << get picture;
);