帶有活動標籤的視窗選項卡你好,
我的腳本為每個二元趨勢圖創建一個帶有新選項卡的窗口,我的問題是圖例處於非活動狀態。
我的最終目標是能夠在互動式 HTML 中突出顯示圖例群組。
我嘗試添加本地數據過濾器 - 但它對我不起作用。
我還嘗試添加相同的傳奇分佈圖。
我喜歡獲得更多關於我做錯的事情的想法或見解。
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
NW = New Window( "new window", Text Box( "Creation Date: " || Substitute( Format( Today(), "ddMonyyyy h:m:s" ), "-", ":" ) ), tb = tab Box() );
sex_list = Associative Array( :sex ) << Get Keys;
For( i = 1, i <= N items( sex_list ), i++,
dt << Clear Row States;
dt << Select Where( :sex == sex_list[i] ) << Invert Row Selection << Hide and Exclude;
dt << clear select;
// create trend chart with limits
Biv = dt << Bivariate(
Y( :height ),
X( :weight ),
/* By( :Var ),
Local Data Filter(
Mode( Include( 0 ) ),
Add Filter( columns( :CHAMBER ), Display( :CHAMBER) )
),*/
SendToReport(
Dispatch(
{},
"Bivar Plot",
FrameBox,
{Frame Size( 1000, 300 ), Row Legend(
name,
Color( 1 ),
Color Theme( "JMP Default"(1) ),
Marker( 1 ),
Marker Theme( "Standard" )
)}
)
)
);
Dis = dt << Distribution( Nominal Distribution( Column( :name ), Frequencies( 0 ) ) );
tb << Append( Char(Sex_list[i]) , H list box(Report( Dis ), Report( Biv )));
Biv << Close window;
Dis << Close window;
);
NW << save Interactive HTML( SaveDirectory || "new window.htm" ) << close window;
dt << close window;
回覆:帶有活動標籤的視窗選項卡您僅將報表附加到新窗口,且該視窗不是互動式的(JMP 平台中有兩個「層」)。您可以透過附加平台來獲得一些互動性,但圖例不會是互動性的
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/big class.jmp");
NW = New Window("new window",
Text Box("Creation Date: " || Substitute(Format(Today(), "ddMonyyyy h:m:s"), "-", ":")),
tb = Tab Box()
);
sex_list = Associative Array(:sex) << Get Keys;
For(i = 1, i <= N Items(sex_list), i++,
dt << Clear Row States;
dt << Select Where(:sex == sex_list[i]) << Invert Row Selection << Hide and Exclude;
dt << clear select;
biv_expr = Expr(dt << Bivariate(
Y(:height),
X(:weight),
SendToReport(
Dispatch({}, "Bivar Plot", FrameBox,
{Frame Size(1000, 300), Row Legend(
name,
Color(1),
Color Theme("JMP Default"(1)),
Marker(1),
Marker Theme("Standard")
)}
)
)
));
dist_expr = Expr(dt << Distribution(Automatic Recalc(1), Nominal Distribution(Column(:name), Frequencies(0))));
tb << Append(
Char(Sex_list[i]),
H List Box(
dist_expr,
biv_expr
)
);
);
nw << Save Interactive HTML("$TEMP/deleteme.html");
Close(dt, no save);
Web("$TEMP/deleteme.html");
Write();
如果您有JMP18 並使用圖形生成器來創建散點圖,那麼我認為您可以通過一些小的額外工作獲得交互式圖例(使用標記行狀態,然後在圖形生成器中使用與覆蓋/顏色相同的列)