樣條線-圖例與過濾器問題你好,
當我運行腳本時,樣條線和圖例顏色匹配,當我單擊過濾器時,圖例顏色發生變化,但樣條線保持不變,導致資料混亂。
無論濾鏡如何,如何為圖例和樣條線設定相同的顏色?
在版本中,當我提前過濾時,樣條線不適用於其他過濾器,我該怎麼辦?
附相關腳本。
</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();
回覆:樣條線-圖例與過濾器問題你好,
我的意思是,如果我刪除最初配置的過濾器(其中) - 則沒有其他資料的樣條線。
可以採取什麼措施來因應呢?