样条线-图例和过滤器问题你好,
当我运行脚本时,样条线和图例颜色匹配,当我单击过滤器时,图例颜色会发生变化,但样条线保持不变,从而导致数据混乱。
如何为图例和样条线设置相同的颜色,而不管过滤器如何?
在编辑中,当我提前过滤时,样条线对其他过滤器不起作用,我该怎么办?
附上相关脚本。
</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 )} );
)基础数据分析与建模回复:样条线-图例和过滤器问题我认为这将需要使用过滤器更改处理程序编写一些脚本,因为这些线不遵循行状态/值颜色列属性(此外,如果只有一个点,则不会适合任何线)。我不确定您所说的“不适用于其他过滤器”是什么意思?
由于过滤器更改处理程序的工作方式,这可能不是一个非常强大的选项,但这是我想到的第一个想法......
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();
回复:样条线-图例和过滤器问题你好,
我的意思是,如果我删除最初配置的过滤器(其中) - 就没有其他数据的样条线。
怎样才能解决这个问题?