La legenda di stampa viene rimossa quando si trova all'interno di una casella di riepilogoCiao a tutti,
Quindi ho un problema con una trama che sto creando attraverso una funzione. La funzione è la seguente:
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 )} )
)
);
);
Quando chiamo questa funzione da sola, tutto va bene. La trama e la trama sono normali. Tuttavia, quando chiamo la funzione all'interno di una casella di riepilogo, la legenda viene rimossa e la dimensione dei grafici viene modificata.
Nel codice seguente, chiamo la funzione due volte in una finestra. La prima volta che si trova in una casella di riepilogo H e la legenda viene rimossa. Ma la seconda chiamata della funzione funziona normalmente.
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
)
);
Qualcuno ha un'idea di quale potrebbe essere il problema?
Ri: La legenda di trama viene rimossa quando si trova all'interno di una casella di riepilogoFunziona un fascino. Grazie per l'aiuto. Sono sicuro che ci è voluto un bel po 'del tuo tempo.
È molto apprezzato,
David
Ri: La legenda di trama viene rimossa quando si trova all'interno di una casella di riepilogoApparentemente, dall'interno della H List Box (), o anche quando ho usato un Outline Box (), la concatenazione di "Run Chart of" e le variabili y1, y2 o y3 non viene eseguita. Ho rielaborato lo script, costringendo la stringa a essere calcolata correttamente e lo script quindi viene completato correttamente
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
)
);Ri: La legenda di trama viene rimossa quando si trova all'interno di una casella di riepilogoQuindi quando eseguo questo script:
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 )
);Ottengo questo risultato:
Come si può vedere, la legenda appare solo per la chiamata di funzione al di fuori della casella di riepilogo H.

Vedi il registro:

Puoi confermare se vedi questo problema? Qualche idea su cosa possa essere sbagliato?
Ri: La legenda di trama viene rimossa quando si trova all'interno di una casella di riepilogoGrazie per la risposta.
Veramente? Entrambe le chiamate della funzione hanno prodotto una trama con una legenda?
Interessante. Dovrò guardare più da vicino. Forse è qualcosa a che fare con i dati. Sto anche eseguendo JMP 14Ri: La legenda di trama viene rimossa quando si trova all'interno di una casella di riepilogoHo eseguito il tuo script in JMP 14 e non ho riscontrato problemi.