Plot 범례는 목록 상자 안에있을 때 제거됩니다.안녕 모두,
그래서 저는 함수를 통해 만드는 음모에 문제가 있습니다. 함수는 다음과 같습니다.
myRunChart = Function( {dt, y1, y2, y3, x, colour_col},
{Default Local},
dt << Control Chart(
Sample Label( Eval( x ) ),
KSigma( 3 ),
Chart Col( Eval( y1 ), Run Chart( Show Center Line( 0 ) ) ),
Chart Col( Eval( y2 ), Run Chart( Show Center Line( 0 ) ) ),
Chart Col( Eval( y3 ), Run Chart( Show Center Line( 0 ) ) ),
SendToReport(
Dispatch(
{Eval( "Run Chart of "|| y1 )},
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ), Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch( {Eval( "Run Chart of "|| y1 )}, "Control Chart Limits frame", FrameBox, {Frame Size( 69, 114 )} ),
Dispatch(
{Eval( "Run Chart of "|| y2 )},
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ), Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch( {Eval( "Run Chart of "|| y2 )}, "Control Chart Limits frame", FrameBox, {Frame Size( 69, 114 )} ),
Dispatch(
{Eval( "Run Chart of "|| y3 )},
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ), Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch( {Eval( "Run Chart of "|| y3 )}, "Control Chart Limits frame", FrameBox, {Frame Size( 69, 114 )} )
)
);
);
이 함수를 단독으로 호출하면 모든 것이 정상입니다. 플롯과 범례는 정상적으로 그려집니다. 그러나 목록 상자 내에서 함수를 호출하면 범례가 제거되고 그래프의 크기가 변경됩니다.
다음 코드에서는 창에서 함수를 두 번 호출합니다. 처음으로 H 목록 상자 안에 들어가고 범례가 제거됩니다. 그러나이 기능의 두 번째 호출은 정상적으로 작동합니다.
nw2 = New Window("temp",
H list box(
rc2 = myRunChart(
dt_temp,
"column1",
"column2",
"column3",
time_col,
colour_col
)),
rc3 = myRunChart(
dt_temp,
"column4",
"column5",
"column6",
time_col,
colour_col
)
);
누구든지 어떤 이슈가 될 수 있는지 알고 있습니까?
Re : Plot 범례는 목록 상자 안에있을 때 제거됩니다.매력을 발휘합니다. 도와 줘서 고마워. 나는 이것이 당신의 시간을 공정하게 가졌음을 확신한다.
크게 감사드립니다.
데이비드
Re : Plot 범례는 목록 상자 안에있을 때 제거됩니다.분명히, H 목록 상자 () 또는 심지어 아웃 라인 상자 () 사용했을 때, "실행 차트"와 y1, y2 또는 y3 변수의 연결이 수행되고 있지 않습니다. 스크립트를 다시 작성하여 문자열이 올바르게 계산되도록하고 스크립트가 올바르게 완료되었습니다.
myRunChart = Function( {dt, y1, y2, y3, x, colour_col},
{Default Local},
Eval(
Substitute(
Expr(
dt << Control Chart(
Sample Label( Eval( x ) ),
KSigma( 3 ),
Chart Col( Eval( y1 ), Run Chart( Show Center Line( 0 ) ) ),
Chart Col( Eval( y2 ), Run Chart( Show Center Line( 0 ) ) ),
Chart Col( Eval( y3 ), Run Chart( Show Center Line( 0 ) ) ),
SendToReport(
Dispatch(
{ __y1__ },
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ),
Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch(
{ __y2__ },
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ),
Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch(
{ __y3__ },
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ),
Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
)
),
Expr( __y1__ ), "Run Chart of " || y1,
Expr( __y2__ ), "Run Chart of " || y2,
Expr( __y3__ ), "Run Chart of " || y3
)
);
Wait( 0 );
);
dt_temp = Open( "$SAMPLE_DATA\Solubility.jmp" );
Wait( 0 );
dt_temp << New Column( "Colour example" );
dt_temp:Colour Example << set formula( Modulo( Row(), 2 ) + 1 );
dt_temp << New Column( "Row Numbers" );
dt_temp:Row Numbers << set formula( Row() );
time_col = "Row Numbers";
colour_col = "Colour Example";
Wait( 0 );
nw2 = New Window( "temp",
H List Box(
"charts",
rc2 = myRunChart(
dt_temp,
"Chloroform",
"Benzene",
"Hexane",
time_col,
colour_col
)
),
rc3 = myRunChart(
dt_temp,
"Chloroform",
"Benzene",
"Hexane",
time_col,
colour_col
)
);Re : Plot 범례는 목록 상자 안에있을 때 제거됩니다.그래서이 스크립트를 실행할 때 :
myRunChart = Function( {dt, y1, y2, y3, x, colour_col},
{Default Local},
dt << Control Chart(
Sample Label( Eval( x ) ),
KSigma( 3 ),
Chart Col( Eval( y1 ), Run Chart( Show Center Line( 0 ) ) ),
Chart Col( Eval( y2 ), Run Chart( Show Center Line( 0 ) ) ),
Chart Col( Eval( y3 ), Run Chart( Show Center Line( 0 ) ) ),
SendToReport(
Dispatch(
{Eval( "Run Chart of " || y1 )},
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ), Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch(
{Eval( "Run Chart of " || y2 )},
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ), Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
),
Dispatch(
{Eval( "Run Chart of " || y3 )},
"Run Chart",
FrameBox,
{Frame Size( 436, 114 ), Row Legend(
Eval( colour_col ),
Color( 1 ),
Color Theme( "JMP Default" ),
Marker( 0 ),
Marker Theme( "" ),
Continuous Scale( 0 ),
Reverse Scale( 0 ),
Excluded Rows( 0 )
)}
)
)
);
wait(0);
);
dt_temp = Open("C:\Program Files\SAS\JMP\14\Samples\Data\Solubility.jmp");
wait(0);
dt_temp << new Column ("Colour example");
dt_temp:Colour Example << set formula(modulo(row(),2) + 1);
dt_temp << new column ("Row Numbers");
dt_temp:Row Numbers << set formula(row());
time_col = "Row Numbers";
colour_col = "Colour Example";
wait(0);
nw2 = New Window( "temp",
H List Box( rc2 = myRunChart( dt_temp, "Chloroform", "Benzene", "Hexane", time_col, colour_col ) ),
rc3 = myRunChart( dt_temp, "Chloroform", "Benzene", "Hexane", time_col, colour_col )
);나는이 산출을 얻는다 :
보시다시피 범례는 H 목록 상자 외부의 함수 호출에만 나타납니다.

로그보기 :

이 문제가 보이면 확인할 수 있습니까? 어떤 아이디어가 잘못 될 수 있습니까?
Re : Plot 범례는 목록 상자 안에있을 때 제거됩니다.당신의 답변에 감사드립니다.
정말? 함수의 두 호출 모두 전설과 함께 음모를 만들었습니까?
그 흥미 롭군요. 나는 더 가까이 봐야 할 것이다. 아마도 그것은 데이터와 관련이 있습니다. JMP 14도 실행 중입니다.Re : Plot 범례는 목록 상자 안에있을 때 제거됩니다.JMP 14에서 스크립트를 실행했지만 문제가 발생하지 않았습니다.