スプライン - 凡例とフィルターの問題こんにちは、
スクリプトを実行すると、スプラインと凡例の色は一致しますが、フィルターをクリックすると、凡例の色は変わりますが、スプラインは同じままで、データに混乱が生じます。
フィルターに関係なく、凡例とスプラインの両方に同じ色を設定するにはどうすればよいでしょうか?
エディションで、事前にフィルタリングすると、スプラインが他のフィルタでは機能しません。どうすればいいですか?
関連するスクリプトを添付しました。
</CODE></PRE>
<P> </P>
<PRE><CODE class=" language-jsl">Lineup Box(
abc = Bivariate(
Y( :total_defects ),
X( :start_date ),
Automatic Recalc( 1 ),
Local Data Filter(
Conditional,
Add Filter(
columns( :CU_NC, :ceid, :entity ),
Where( :CU_NC == "NC" ),
Where( :ceid == "TNG" ),
Display( :entity, List Display ),
)
),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Label Row( Label Orientation( "Angled" ) )} ),
Dispatch( {}, "2", ScaleBox,
{Min( -5 ), Max( 250 ), Inc( 7 ), Minor Ticks( 1 ),
Add Ref Line( 30, "DashDot", "Red", "UCL", 2 ), Label Row( Show Major Grid( 1 ) )}
),
Dispatch( {}, "Bivar Plot", FrameBox, {Frame Size( 800, 250 )} ),
Dispatch( {}, "Bivar Plot", FrameBox,
{Frame Size( 800, 250 ), Row Legend(
entity,
Color( 1 ),
Color Theme( "JMP Default"(1) ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
),
);
abc << group by( :entity );
abc << fit spline( 0.1, Standardized, {Line Width( 2 ), Report( 0 )} );
)基本的なデータ分析とモデリングRe: スプライン - 凡例とフィルターの問題これらの線は行の状態/値の色列のプロパティに従わないため、フィルター変更ハンドラーを使用したスクリプトが必要になると思います (また、ポイントが 1 つしかない場合は、線は適合しません)。「他のフィルターでは機能しない」とはどういう意味かわかりません。
フィルター変更ハンドラーの動作方法により、これはあまり堅牢なオプションではないかもしれませんが、私が最初に思いついたアイデアは...
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, "age") << Set Property(
"Value Colors",
{12 = -13912408, 13 = -4042310, 14 = -4354269, 15 = -13400361, 16 = -2668175, 17 = -10628061}
);
nw = new window("",
Lineup Box(
biv = dt << Bivariate(
Y(:height),
X(:weight),
Automatic Recalc(1),
SendToReport(
Dispatch({}, "1", ScaleBox, {Label Row(Label Orientation("Angled"))}),
Dispatch(
{},
"2",
ScaleBox,
{Min(-5), Max(250), Inc(7), Minor Ticks(1), Add Ref Line(30, "DashDot", "Red", "UCL", 2),
Label Row(Show Major Grid(1))}
),
Dispatch({}, "Bivar Plot", FrameBox, {Frame Size(800, 250)}),
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Frame Size(800, 250), Row Legend(
age,
Color(1),
Color Theme(""),
Marker(0),
Marker Theme(""),
Continuous Scale(0),
Reverse Scale(0),
Excluded Rows(0)
)}
)
)
);
)
);
ldf = biv << Local Data Filter(
Conditional,
Add Filter(
columns(:sex, :name, :age),
Where(:sex == "M")
)
);
summarize(dt, groups = by(:age)); // based on your By column
fitlines = Function({a},
For(i = 1, i <= N Items(groups), i++,
biv << (Curve[1] << remove fit);
);
biv << group by(:age);
biv << fit spline(0.1, Standardized, {Line Width(2), Report(0)});
wait(0);
);
ss = ldf << Make Filter Change Handler(fitlines);
fitlines(1);
Write();
Re: スプライン - 凡例とフィルターの問題こんにちは、
つまり、最初に構成されたフィルター (where) を削除すると、他のデータ用のスプラインがなくなるということです。
対処するには何ができるでしょうか?