如何让生命分布平台使用行状态中定义的颜色?在分析平台中,我期望图形颜色与行状态中定义的颜色相匹配(如果适用)。然而,情况似乎并非如此。下面是来自大班的示例,我根据性别变量应用了行状态颜色,然后分析了按性别分组的寿命分布。使用标准蓝色和红色代替数据表中的紫色和橙色。

代码
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 ),
);
大规模定制Re: 如何让生活分发平台使用行状态中定义的颜色?我目前的解决方法是循环“CustomStream”和“Marker”段,并从行状态中获取颜色值。 我真的希望有更好的方法。
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] ) ) )};
);