Your example does not add two references lines. It adds a colored region in the range when you supply a list with two values.
You might have to modify the reference data table that you construct. This example should illustrate the approach;
Names Default to Here( 1 );
// data table with reference line specifications
ref dt = New Table( "Reference Lines",
Add Rows( 5 ),
New Column( "Segment",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 5] )
),
New Column( "Low",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [50, 55, 60, 65, 70] )
),
New Column( "High",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values( [55, 60, 65, 70, 75] )
),
New Column( "Color",
Character,
"Nominal",
Set Values( {"Red", "Yellow", "Green", "Yellow", "Red"} )
)
);
data = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = data << Bivariate( Y( :weight ), X( :height ) );
x axis = Report( biv )[AxisBox(2)];
For Each Row( ref dt,
// draw colored regon
Eval( Eval Expr( x axis << Add Ref Line( { Expr( :Low ), Expr( :High ) }, "Solid", Expr( :Color ), , , 0.25 ) ) );
// draw border lines
Eval( Eval Expr( x axis << Add Ref Line( Expr( :Low ), "Solid", "Black" ) ) );
Eval( Eval Expr( x axis << Add Ref Line( Expr( :High ), "Solid", "Black" ) ) );
);