二変量適合の色こんにちは、二変量フィットをプロットし、「実行」ごとに直線をフィットさせます。 行の凡例の色は、線形適合線の色と一致します (写真 1 を参照)。
ローカル データ フィルターを適用して "Date" を変更すると、"Run" が変更される可能性がありますが、行の凡例の色が線形適合線の色と一致するようになりました。 写真 2 を参照してください。Run 14 は赤い点ですが、線形適合線は緑です。
行の凡例と線形適合線が常に同じになる方法はありますか? データテーブルとスクリプトを添付しました。
図 1: 行の凡例の色は線形適合線の色と一致します。

図 2: 行の凡例の色が線形適合線の色と一致しません。

スクリプティングRe: 二変量適合の色実行列の列プロパティ、値の色を設定します。ローカル フィルターが変更されると、実行列の各レベルに設定された値の色が常に使用されます。
Re: 二変量適合の色私はまだ何か間違ったことをしていると思います。 これは私が使用しているコードです。 データ テーブルは、この踏み板の最初の支柱に取り付けられています。 ローカル データ フィルターを日付で移動すると、実行の 1 つが消え、色が変わります。 私は何を間違っていますか?
dt = Current Data Table();
Show( :Run << get property( "Value Colors" ) );
:Run << set property( "Value Colors", {} );
:Run << color cell by value( 1 );
Show( :Run << get property( "Value Colors" ) );
Bivariate(
Y( :Result ),
X( :Date ),
Fit Where( :Run == "10", Fit Line( {Line Color( {} )} ) ),
Fit Where( :Run == "14", Fit Line( {Line Color( {} )} ) ),
Fit Where( :Run == "24", Fit Line( {Line Color( {} )} ) ),
Fit Where( :Run == "32", Fit Line( {Line Color( {} )} ) ),
Local Data Filter(
Add Filter(
columns( :Date ),
Where( :Date >= 12Mar2022:05:43:20 & :Date <= 06May2022 )
)
),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
Run,
Color( 1 ),
Color Theme( "" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);Re: 二変量適合の色Fit Where で線の色を指定しているときに、値の色の選択を削除しています。以下は、色が同じままである例です


Names Default To Here( 1 );
dt = Current Data Table();
Show( :Run << get property( "Value Colors" ) );
:Run << set property( "Value Colors", {"10" = 35, "14" = 68, "24" = 77, "32" = 75} );
:Run << color cell by value( 1 );
Show( :Run << get property( "Value Colors" ) );
Bivariate(
Y( :Result ),
X( :Date ),
Fit Where( :Run == "10", Fit Line() ),
Fit Where( :Run == "14", Fit Line() ),
Fit Where( :Run == "24", Fit Line() ),
Fit Where( :Run == "32", Fit Line() ),
Local Data Filter(
Add Filter(
columns( :Date ),
Where( :Date >= 12Mar2022:05:43:20 & :Date <= 06May2022 )
)
),
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Row Legend(
Run,
Color( 1 ),
Color Theme( "" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);Re: 二変量適合の色魔法のように働きました、ありがとう!