현재 덴드로그램에 표시된 행 가져오기안녕하십니까,
확대/축소 작업 후 현재 덴드로그램에 어떤 개인이 표시되는지 알 수 있는 방법이 있는지 알고 싶습니다.
다음은 예입니다.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" );
Hierarchical Cluster(
Y( :birth, :death ),
Label( :country ),
Method( "Ward" ),
Standardize Data( 1 ),
Dendrogram Scale( "Distance Scale" ),
Number of Clusters( 4 ),
SendToReport(
Dispatch( {}, "Dendrogram", OutlineBox, {SetHorizontal( 1 )} ),
Dispatch(
{"Dendrogram"},
"2",
ScaleBox,
{Min( 18 ), Max( 31 ), Inc( 5 ), Minor Ticks( 0 )}
)
)
);선택한 13개국의 목록을 받고 싶습니다.
좋은 해결책은 최소값과 최대값(18 및 31)을 얻는 것이지만 지금까지 추출하는 방법을 찾을 수 없다고 생각합니다...
도움을 주셔서 미리 감사드립니다!
Re: 현재 덴드로그램에 표시된 행 가져오기안녕 @txnelson ,
나는 이 기능을 사용한 적이 없지만 JMP의 가능성을 진정으로 확장합니다. 정말 좋습니다!!
내 상황에서는 실제로 행을 선택할 필요가 없지만 minOrder 및 maxOrder 값을 가져오기만 하면 됩니다. 그것이 내가 언급 한 것처럼 간섭 문제가 없을 것이라고 생각하는 이유입니다. @줄리안 . 테스트해봐야겠어요 
도움을 주신 두 분께 다시 한 번 감사드립니다!
Re: 현재 덴드로그램에 표시된 행 가져오기아, 우리가 간다. 그거 생각했어야지!
//편집: 해당 그래픽 스크립트를 추가하면 선택한 클러스터를 두 번 클릭하여 확대/축소하는 것을 방해하는 것 같습니다. 확실히 작동하게 할 수 있는 방법이 있지만 현재로서는 이 버튼이 매우 간단해 보입니다. 특히 덴드로그램에서 개인을 선택할 수 있지만 현재 확대/축소로 선택을 다시 설정하려는 경우에 그렇습니다.
Re: 현재 덴드로그램에 표시된 행 가져오기그래픽 스크립트를 첨부할 수 있습니다.
obj << 그래픽 추가 스크립트()
덴도그래프 프레임박스로 이동합니다.그래프에 작업이 수행될 때마다 트리거됩니다.추가된 스크립트에서 minOrder 또는 MaxOrder가 변경되었는지 확인할 수 있습니다.
Re: 현재 덴드로그램에 표시된 행 가져오기안녕 @anne_sa ,
좋은 아이디어지만 그렇게 하는 쉬운 방법을 찾지 못했습니다. 선택 항목을 호출하는 창 하단의 버튼은 어떻습니까?
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" );
hcPlatform = Hierarchical Cluster(
Y( :birth, :death ),
Label( :country ),
Method( "Ward" ),
Standardize Data( 1 ),
Dendrogram Scale( "Distance Scale" ),
Number of Clusters( 4 ),
SendToReport(
Dispatch( {}, "Dendrogram", OutlineBox, {SetHorizontal( 1 )} ),
Dispatch( {"Dendrogram"}, "2", ScaleBox, {Min( 18 ), Max( 31 ), Inc( 5 ), Minor Ticks( 0 )} )
)
);
//save the order displayed in the platform
displayOrd = hcPlatform << Save Display Order;
selectZoom = expr(
//get the script, which contains the Min() and Max() information
exprPlat = hcPlatform << Get Script;
//Extract the Min and Max. This is indexed in the reverse of the Display Order
//that is, the max value is the first in the order (as if it is an axis), so subtracting
//this value from the number of rows in the table brings things into alignment
minOrder = 1 + N Rows( dt ) - Arg( Extract Expr( exprPlat, Max( Wild() ) ) );
maxOrder = N Rows( dt ) - Arg( Extract Expr( exprPlat, Min( Wild() ) ) );
//select the rows in the table that meet the condition of being in the randge displayed
dt << Select Where( And( As Column( displayOrd ) >= minOrder, As Column( displayOrd ) <= maxOrder ) );
//get the matrix of row numbers for the selected rows, i.e., rows displayed in zoom
matchingRows = dt << get selected rows;
);
//add the button to the report
report(hcPlatform)<<APPEND></APPEND>
@줄리안
Re: 현재 덴드로그램에 표시된 행 가져오기안녕 @줄리안 ,
제가 찾던 바로 그 빠른 답변 감사합니다!!!
작은 추가 질문이 있습니다. 덴드로그램에서 확대/축소 작업이 수행되었음을 감지하는 방법이 있습니까? <
Re: 현재 덴드로그램에 표시된 행 가져오기아주 멋지게 완성했습니다.
Re: 현재 덴드로그램에 표시된 행 가져오기안녕 @anne_sa ,
해당 행을 가져오는 직접적인 방법은 모르지만 최소 및 최대 정보가 플랫폼용 스크립트의 일부이고 덴드로그램에서 행의 표시 순서를 저장할 수 있기 때문에 원하는 대로 스크립팅할 수 있습니다. 약간의 작업으로 결과에. 완전히 우아하지는 않지만 여기에 내가 생각해낸 한 가지 방법이 있습니다.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Birth Death Subset.jmp" );
hcPlatform = Hierarchical Cluster(
Y( :birth, :death ),
Label( :country ),
Method( "Ward" ),
Standardize Data( 1 ),
Dendrogram Scale( "Distance Scale" ),
Number of Clusters( 4 ),
SendToReport(
Dispatch( {}, "Dendrogram", OutlineBox, {SetHorizontal( 1 )} ),
Dispatch( {"Dendrogram"}, "2", ScaleBox, {Min( 18 ), Max( 31 ), Inc( 5 ), Minor Ticks( 0 )} )
)
);
//save the order displayed in the platform
displayOrd = hcPlatform << Save Display Order;
//get the script, which contains the Min() and Max() information
exprPlat = hcPlatform << Get Script;
//Extract the Min and Max. This is indexed in the reverse of the Display Order
//that is, the max value is the first in the order (as if it is an axis), so subtracting
//this value from the number of rows in the table brings things into alignment
minOrder = 1 + N Rows( dt ) - Arg( Extract Expr( exprPlat, Max( Wild() ) ) );
maxOrder = N Rows( dt ) - Arg( Extract Expr( exprPlat, Min( Wild() ) ) );
//select the rows in the table that meet the condition of being in the randge displayed
dt << Select Where( And( As Column( displayOrd ) >= minOrder, As Column( displayOrd ) <= maxOrder ) );
//get the matrix of row numbers for the selected rows, i.e., rows displayed in zoom
matchingRows = dt << get selected rows;
이게 도움이 되길 바란다!
@줄리안