In analysis platforms I expected the graph colors to match with what is defined in the row states (if applicable). This does not seem to be the case however. Below example from big class where I applied row state colors based on the Sex variable, and then analyze life distribution grouped by Sex as well. The standard blue and red colors are used instead of the purple and orange in the datatable.
The code
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt << Set Row States(
[6144, 6144, 6144, 6144, 6144, 1536, 1536, 1536, 6145, 6144, 6144, 1536, 1536, 1536, 1536, 6144, 6144, 6144, 6144, 6144, 1536, 1536, 1536, 1536,
1536, 1536, 1536, 6144, 6144, 1536, 1536, 1536, 1536, 1536, 6144, 6144, 1536, 6144, 1536, 1536]
);
Life Distribution(
Perspective( Compare Groups ),
Y( :height ),
Grouping( :sex ),
Confidence Interval Method( Wald ),
Select Distribution( Distribution, Weibull ),
Select Scale( Weibull ),
Tabbed Report( 0 ),
);
My current work around for this is to loop the "CustomStream" and the "Marker" segments and takes the color values from the row states. I do really hope there's a better way though.
dt = Open( "$SAMPLE_DATA\big class.jmp" );
dt << Set Row States(
[6144, 6144, 6144, 6144, 6144, 1536, 1536, 1536, 6145, 6144, 6144, 1536, 1536, 1536, 1536, 6144, 6144, 6144, 6144, 6144, 1536, 1536, 1536, 1536,
1536, 1536, 1536, 6144, 6144, 1536, 1536, 1536, 1536, 1536, 6144, 6144, 1536, 6144, 1536, 1536]
);
//dt = Current Data Table();
dtsum = dt << Summary( Group( :Sex));
cc = dtsum << get row states();
Close( dtsum, NoSave );
platform = Life Distribution(
Perspective( Compare Groups ),
Y( :height ),
Grouping( :sex ),
Confidence Interval Method( Wald ),
Select Distribution( Distribution, Weibull ),
Select Scale( Weibull ),
Tabbed Report( 0 ),
);
reportWindow = platform << Report;
customSegs = reportWindow["Compare Distribution"]<< Xpath( "//CustomStreamSeg" );
markerSegs = reportWindow["Compare Distribution"]<< Xpath( "//MarkerSeg" );
For( i = 1, i <= N Items( customSegs ), i++,
customSegs[i] << {Fill Color( Color Of( As Row State( cc[i] ) ) ), Fill( 0 )};
customSegs[i] << {Line Color( Color Of( As Row State( cc[i] ) ) ), Fill( 0 )};
markerSegs[2*i-1] << {Color( Color Of( As Row State( cc[i] ) ) )};
);