The approach I took to solve this problem is to create a new column that has a reversed value and then it applies a Value Label to label the groupings correctly.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
// Method 1 ... didn't work
// Column(dt, "weight")<<Set Property( "Axis", {Reversed Scale} );
// Method 2 ... didn't work
// List=sort descending(as list(Column(dt, "weight")<<get values))
// Column(dt, "weight")<<Set Property( "Value Ordering", List);
dt << New Column( "New Weight",
ordinal,
formula(
If(
:weight <= Floor( Col Quantile( :weight, .333 ) + 1 ), 3,
:Weight <= Floor( Col Quantile( :weight, .666 ) + 1 ), 2,
1
)
)
);
Eval(
Substitute(
Expr(
dt:new weight << set property( "value labels", {3 = _3_, 2 = _2_, 1 = _1_} )
),
Expr( _3_ ),
Char( Min( dt:weight[dt << get rows where( :New Weight == 3 )] ) ) || "-" ||
Char( Max( dt:weight[dt << get rows where( :New Weight == 3 )] ) ),
Expr( _2_ ),
Char( Max( dt:weight[dt << get rows where( :New Weight == 3 )] ) ) || "-" ||
Char( Max( dt:weight[dt << get rows where( :New Weight == 2 )] ) ),
Expr( _1_ ),
Char( Max( dt:weight[dt << get rows where( :New Weight == 2 )] ) ) || "-" ||
Char( Max( dt:weight[dt << get rows where( :New Weight == 1 )] ) )
)
);
//Plot
Graph Builder(
Size( 564, 540 ),
Show Control Panel( 0 ),
Variables( X( :sex ), Y( :height ), Group Y( :New Weight, levels( 3 ) ) ),
Elements( Points( X, Y, Legend( 2 ) ) ),
);
The code is pretty basic, but will work for data where you want it grouped into 3 bins. It could be expanded to allow for any number of levels.
Jim