Try this on for size
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Create a new column
dt << New Column( "Sex_Class", character, formula( :Sex || "_" || Char( :Age ) ) );
// Determine how many groups in the :Sex_Class
Summarize( dt, groups = by( :Sex_Class ) );
// Create the value colors list
colorlist = {};
For( i = 1, i <= N Items( groups ), i++,
If( Substr( groups[i], 1, 1 ) == "F",
color = 19,
color = 21
);
Eval(
Substitute(
Expr(
Insert Into( colorlist, __group__ )
),
Expr( __group__ ), Parse( "{\!"" || groups[i] || "\!"" || "=" || Char( color ) || "}" )
)
);
);
// Set the Value Colors property for the Sex_Class column
dt:sex_CLASS << set property( "value colors", Eval( colorlist ) );
linetype = {"Solid", "Dotted", "DashDot", "DashDotDot", "Dashed"};
TheExpr =
"Oneway(
Y( :weight ),
X( :Sex_Class ),
All Graphs( 0 ),
Plot Quantile by Actual( 1 ),
Line of Fit( 0 ),
X Axis Proportional( 0 ),
Grand Mean( 0 ),
SendToReport(
Dispatch(
{},
\!"222\!",
ScaleBox,
{Legend Model(
1,";
For( i = 1, i <= N Items( groups ), i++,
If( i > 1,
TheExpr = TheExpr || ","
);
TheExpr = TheExpr || "Properties(" || Char( i ) || ", {Line Style(\!"" || linetype[Mod( i, 5 ) + 1] || "\!" )} )";
);
TheExpr = TheExpr || "),
)}
)";
Eval( Parse( theexpr ) );
There are only 5 line styles available
Jim