다중 열 전환기여러 열 전환기를 실행할 때 동일한 열이 선택되지 않도록 하는 방법이 있습니까?
dt = open("$SAMPLE_DATA/Candy Bars.jmp");
biv = dt << Bivariate(
Y( :Saturated fat g ),
X( :Sugars g ),
SendToReport( Dispatch( {}, "Bivar Plot", FrameBox, {Frame Size( 593, 564 )} ) )
);
cs1 = biv << Column Switcher(
:Saturated fat g,
{:Name( "Serving/pkg" ), :Calories, :Total fat g, :Saturated fat g,
:Cholesterol g, :Sodium mg, :Carbohydrate g, :Dietary fiber g, :Sugars g,
:Protein g, :Vitamin A %RDI, :Vitamin C %RDI, :Calcium %RDI, :Iron %RDI}
);
cs2 = biv << Column Switcher(
:Sugars g,
{:Name( "Oz/pkg" ), :Calories, :Total fat g, :Saturated fat g,
:Cholesterol g, :Sodium mg, :Carbohydrate g, :Dietary fiber g, :Sugars g,
:Protein g, :Vitamin A %RDI, :Iron %RDI}
);
cs1 << Run;
cs2 << Run;
이 작업을 충분히 오래 실행하면 결국 cs2가 cs1을 따라잡고 오류가 발생합니다.이제 열이 동일하므로 cs1 및 cs2는 X/Y 종속성을 잃고 이제 두 매개변수를 모두 변경합니다.따라서 X=Y는 이제 항상 참입니다.
해결 방법을 아는 사람이 있습니까?
Re: 다중 열 전환기여기에 버튼이 있습니다.이것은 Schedule()을 사용하여 애니메이션을 실행하고 setIcon()을 사용하여 그래픽을 얻습니다.Write() 문은 변수를 변경하는 논리로 대체되어야 합니다.OnClose는 보이는 창이 닫힐 때 스케줄러 창을 닫도록 보이는 창을 설정합니다.

stop = 0; // animating state
loopFun = Function( {},
If( !stop,
Write( "go again\!n" ); // logic for animation
Schedule( .5, loopFun() ); // continue the animation 1/2 second later
)
);
New Window( "buttons",
<<ONCLOSE></ONCLOSE>
Re: 다중 열 전환기실제로 Col List Box 기능을 사용하여 서식이 작동하도록 했습니다.그러나 사용자 지정 재생 및 중지 버튼을 만들기 위해 시간을 할애한 사람이 있다면 대단히 감사할 것입니다!
다음은 xcolumns 및 ycolumns가 전환하려는 열 목록이고 dt가 데이터 테이블인 사용자 지정 스위처용으로 신속하게 만든 코드입니다.
xnlines = If(nitems(xcolumns) > 15, 15, nitems(xcolumns));
ynlines = If(nitems(ycolumns) > 15, 15, nitems(ycolumns));
vlb << Append(hlb = Hlistbox(VlistBox(
Text Box("Column X"),
columnswitcherX = Col List Box(width(250), maxSelected(1), nlines(xnlines)),
Text Box("Column Y"),
columnswitcherY = Col List Box(width(250), maxSelected(1), nlines(ynlines)))));
columnswitcherX << Append(xcolumns);
columnswitcherY << Append(ycolumns);
columnswitcherX << Set Selected(1);
columnswitcherX << Set Script(
bivcolx = columnswitcherX << get selected;
bivcoly = columnswitcherY << get selected;
try(interactivebiv << Delete Box);
hlb << Append(interactivebiv = dt << Bivariate( X( Column(dtinteractive, bivcolx) ), Y( Column(dtinteractive, bivcoly) ), Fit Line( {Line Color( {213, 72, 87} )} )) )
);
columnswitcherY << Set Script(
bivcolx = columnswitcherX << get selected;
bivcoly = columnswitcherY << get selected;
try(interactivebiv << Delete Box);
hlb << Append(interactivebiv = dt << Bivariate( X( Column(dtinteractive, bivcolx) ), Y( Column(dtinteractive, bivcoly) ), Fit Line( {Line Color( {213, 72, 87} )} )) )
);
columnswitcherY << Set Selected(1);
Re: 다중 열 전환기<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />그래서 이 작업을 수행했지만 열 이름이 다소 길기 때문에 목록 상자에서 올바른 형식을 지정할 수 없습니다.열 전환기에서와 같이 표시되도록 하는 방법을 알고 있습니까?(첫 부분....마지막 부분)?
Re: 다중 열 전환기이것은 컬럼 스위처의 성가신 한계입니다.해결 방법은 열 전환기를 사용하지 않고 목록 상자(또는 콤보 상자)를 사용하여 직접 기능을 구현하는 것입니다.이 목록 상자에 이변량 플롯을 삭제하고 목록 상자 선택을 기반으로 새 플롯을 생성하는 스크립트를 첨부합니다.