Graph Builder is using a hybrid sort. Here is a little script that will do that for your list values
refList = {"B100", "A50", "B50"};
For( i = 1, i <= N Items( refList ), i++,
If( Length( refList[i] ) < 4,
refList[i] = Substr( refList[i], 1, 1 ) ||
Substr( "00", Length( refList[i] ) - 1 ) ||
Substr( refList[i], 2 )
);
);
refList = Sort List( refList );
For( i = 1, i <= N Items( refList ), i++,
While( Length( Word( 1, refList[i], "0" ) ) == 1,
refList[i] = Substr( refList[i], 1, 1 ) ||
Substr( refList[i], 3 )
)
);
I also suggest that you take a look at using a simpler method in setting your reference lines. If you go directly to the AxisBox that you want the reference line added to, it is done with simpler code. Below is an example. Also, the Scripting Guide has a complete section on working with Display Trees, and the Scripting Index has definitions and examples for all of the functions.
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
refList = {60,65};
gb = dt << Graph Builder(
Size( 528, 956 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ), Page( :sex ) ),
Elements( Points( X, Y, Legend( 8 ) ), Smoother( X, Y, Legend( 9 ) ) )
);
Summarize( dt, groups = by( :Sex ) );
For( i = 1, i <= N Items( groups ), i++,
Report( gb )[axisbox( i * 2 )] << Add Ref Line(
refList[i],
"Solid",
"Black",
"",
1
)
);
Jim