Hola, aquí un script para trazar gráficos de control (todos los límites de control los establece el usuario y esta parte del código no se muestra aquí). ¿Cómo puedo modificar el script para modificar el título de la gráfica de control?
¡Muchos gracias!
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 );
)}
)}
)
)
)Puede hacer esto simplemente haciendo referencia al cuadro de texto que contiene el título y luego actualizándolo.
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" )
;

Muchos gracias !
Tengo una última pregunta. Quiero cambiar el título del Gráfico de control de acuerdo con los niveles de mi variable "Fuerza".
Usé tu código y lo modifiqué:
summarize(dt,SubSet_Strength=by(:Strength));
Current Report()[Text Box( 1 )] << set text(Char( Variable)||" - "||Char( SubSet_Strength ) );
Y obtuve el siguiente resultado:

¿Cómo puedo tener los niveles de mi variable Fuerza con las comas, pero sin paréntesis y comillas?
¡Gracias!
Su Subset_Strength es una lista JMP, no una cadena de caracteres.Puede usar Concat Items() para tomar los elementos de la lista y moverlos a una cadena de caracteres, que luego se puede usar como lo desee.
Summarize( dt, SubSet_Strength = by( :Strength ) );
Current Report()[Text Box( 1 )] << set text( Char( Variable ) || " - " || Concat Items( Subset_Strength, ", " ) );
¡Perfecto! ¡Muchas gracias!