안녕하세요, 제어 차트를 그리는 스크립트입니다(모든 제어 제한은 사용자가 설정하며 코드의 이 부분은 여기에 표시되지 않음). 컨트롤 차트의 제목을 수정하기 위해 스크립트를 수정하려면 어떻게 해야 합니까?
매우 감사합니다!
dt << Control Chart Builder(
Size( 719, 464 ),
Show Two Shewhart Charts( 0 ),
Show Control Panel( 0 ),
Show Capability( 0 ),
Show Limit Summaries( 0 ),
Variables( Subgroup( :column( Lot ) ), Y( :column( CQA ) ) ),
Chart(
Points( Statistic( "Individual" ) ),
Add Spec Limits( {LSL( LSL_def ), USL( USL_def )} ),
Set Control Limits( {LCL( LCL_def ), UCL( UCL_def ), Avg( Avg )} ),
Warnings( Test 1( 1 ), Test 2( 1 ), Test 3( 1 ) )
),
SendToReport(
Dispatch(
{},
Variable,
ScaleBox,
{Min( Min( LCL_def, LSL_def ) - 1 ), Max( Max( UCL_def, USL_def ) + 1 ), Inc( 1 ), Minor Ticks( 0 ),
Add Ref Line( LSL_def, "Solid", "Blue", "LSL=" || Char( LSL_def ), 2 ),
Add Ref Line(
USL_def,
"Solid",
"Blue",
"USL=" || Char( USL_def ),
2
),
Add Ref Line( LCL_def, "Solid", "Red", "-" || Sigma || "σ=" || Char( LCL_val ), 1 ), Add Ref Line(
UCL_def,
"Solid",
"Red",
"+" || Sigma || "σ=" || Char( UCL_val ),
1
),
Add Ref Line( Avg, "", "Green", "µ=" || Char( Avg ), 1 ), Label Row( Set Font Style( "Bold" ) )}
),
Dispatch(
{},
"Control Chart Builder",
FrameBox,
{Add Graphics Script( 2, Description( "" ), Text( {10, 100}, "" ) ), Add Graphics Script(
3,
Description( "" ),
Pen Color( "black" );
V Line( Split - 0.5 );
), Grid Line Order( 1 ), Reference Line Order( 4 ), DispatchSeg(
TopSeg( 2 ),
{Set Script(
Pen Color( "black" );
V Line( Split - 0.5 );
)}
)}
)
)
)Subset_Strength는 문자열이 아닌 JMP 목록입니다.Concat Items()를 사용하여 목록의 요소를 가져오고 원하는 대로 사용할 수 있는 문자열로 이동할 수 있습니다.
Summarize( dt, SubSet_Strength = by( :Strength ) );
Current Report()[Text Box( 1 )] << set text( Char( Variable ) || " - " || Concat Items( Subset_Strength, ", " ) );
매우 감사합니다 !
마지막 질문이 있습니다. 내 "강도" 변수의 수준에 따라 컨트롤 차트의 제목을 변경하고 싶습니다.
귀하의 코드를 사용하고 수정했습니다.
summarize(dt,SubSet_Strength=by(:Strength));
Current Report()[Text Box( 1 )] << set text(Char( Variable)||" - "||Char( SubSet_Strength ) );
그리고 다음과 같은 결과를 얻었습니다.

쉼표는 있지만 괄호와 따옴표는 없는 Strength 변수의 수준을 어떻게 알 수 있습니까?
감사합니다!
제목이 있는 텍스트 상자를 참조한 다음 업데이트하면 됩니다.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << Control Chart Builder( Variables( Y( :height ) ), Show Control Panel( 0 ) );
Current Report()[Text Box( 1 )] << set text( "new title" )
;
