I changed the label form, and I do not know how to set the label in this case.
I bother the expert to instruct again.
Thanks Experts!
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
r = N Row( dt );ca = "weight";ar = dt << GetAsMatrix( ca );
For( i = 1, i <= r, i++, ar[i, 1] = -ar[i, 1]);dt[0, ca] = ar;
c1 = Quantile( 0.8, dt[0, "height"] );c2 = Quantile( 0.2, dt[0, "weight"] );
ca = "A";New Column( ca, Character,"Nominal");Column( ca ) << Formula( If( height > c1, "A"||char(row()) ) );dt << run formulas;Column( ca ) << deleteFormula;
ca = "B";New Column( ca,Character,"Nominal" );Column( ca ) << Formula( If( weight < c2, "B"||char(row()) ) );dt << run formulas;Column( ca ) << deleteFormula;
Column( "A" ) << set labelled( 1 );Column( "B" ) << set labelled( 1 );Column( "name" ) << set labelled( 0 );
p1 = dt << Graph Builder(
Size( 885, 607 ),
Variables( X( Transform Column( "Row", Formula( Row() ) ) ), Y( :height ), Y( :weight, Position( 1 ) ) ),
Elements( Bar( X, Y( 1 ), Y( 2 ), Legend( 5 ), Bar Style( "Stacked" ), Label( "Label by Row" ) ) ),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties( 0, {Transparency( 0.5 )}, Item ID( "height", 1 ) ),
Properties( 1, {Transparency( 0.5 )}, Item ID( "weight", 1 ) )
)}
)
)
);