如何讓生命分佈平台使用行狀態中定義的顏色?在分析平台中,我希望圖形顏色與行狀態中定義的顏色相符(如果適用)。然而,情況似乎並非如此。以下是來自大類的範例,其中我根據性別變數應用了行狀態顏色,然後也分析了按性別分組的生命分佈。使用標準的藍色和紅色來代替資料表中的紫色和橙色。

程式碼
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] ) ) )};
);