Hola, comunidad de JMP:
He escrito un simple (y un poco torpe) script que ensambla múltiples gráficos de GB en una ventana usando un LineUpBox en el que agrego el FrameBox de cada gráfico: funciona perfectamente ejecutando 182 biomarcadores y ensamblando los gráficos para los que se cumplen ciertas condiciones; (vea abajo). Es de destacar que no puedo compartir fácilmente la tabla de datos asociada con este script debido a la naturaleza confidencial de los datos.
Names Default to Here (1);
dt = Current Data Table ();
CLX = dt << get column names (string);
CList = {};
For (i= 1, i <= N Items (CLX), i++, insert into (CList, substitute (CLX[i], "LSMEAN ", "")));
gbe = Expr (dt << Graph Builder(
Size( 360, 360 ),
Fit to Window( "Off" ),
Level Frame Color( "Medium Dark Gray" ),
Level Spacing Color( "Medium Dark Gray" ),
Level Underline( 1 ),
Page Level Underline( 0 ),
Spacing Borders( 1 ),
Variables(
X( :Name( "DURATION (Week)" ) ),
Y( _YS_ ),
Overlay( :ARM ),
Interval( _STE_ )
),
Elements(
Points( X, Y, Legend( 5 ) ),
Line( X, Y, Interval( 0 ), Legend( 6 ) )
),
SendToReport(
Dispatch(
{},
"DURATION (Week)",
ScaleBox,
{Min( -1.5 ), Max( 10 ), Inc( 2 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"Graph Builder",
FrameBox,
{Marker Size( 6 ), Add Graphics Script(
2,
Description( "Script" ),
Text Color (Black);
Pen Color (black);
Pen size (2);
Line style ("Dotted");
H Line (0);
Text Size (14);
Text( Center Justified, {4, _BPY_}, _LNAME_);
Text size (12);
Text Color( blue );
Text( Center Justified, {2, _TPY1_}, _P1_);
Text( Center Justified, {8, _TPY1_}, _P2_);
Text Color( Green );
Text( Center Justified, {2, _TPY2_}, _P3_);
Text( Center Justified, {8, _TPY2_}, _P4_);
Text Color( purple );
Text( Center Justified, {2, _TPY3_}, _P5_);
Text( Center Justified, {8, _TPY3_}, _P6_);
), Grid Line Order( 5 ), Reference Line Order( 6 )}
)
)
)
);
mylbox = Lineup Box (N Col (8));
For (i = 4, i <= 185, i++, //185
YCOL = Column (i);
STDE = Column (i+182);
LABEL = CList [i];
P1 = Column (dt, i+364) [2];
P2 = Column (dt, i+364) [3];
P3 = Column (dt, i+364) [5];
P4 = Column (dt, i+364) [6];
P5 = Column (dt, i+364) [8];
P6 = Column (dt, i+364) [9];
PPBO1 = Column (dt, i+546) [5];
PPBO2 = Column (dt, i+546) [6];
PPBO3 = Column (dt, i+546) [8];
PPBO4 = Column (dt, i+546) [9];
PVAL1 = CHAR (format(P1, "PValue"));
PVAL2 = CHAR (format(P2, "PValue"));
PVAL3 = CHAR (format(P3, "PValue"));
PVAL4 = CHAR (format(P4, "PValue"));
PVAL5 = CHAR (format(P5, "PValue"));
PVAL6 = CHAR (format(P6, "PValue"));
gbx = substitute (Name Expr (gbe), Expr (_YS_), YCOL,
Expr (_STE_), STDE,
Expr (_TPY1_), 1,
Expr (_TPY2_), 1,
Expr (_TPY3_), 1,
Expr (_BPY_), -1,
Expr (_LNAME_), LABEL,
Expr (_P1_), PVAL1,
Expr (_P2_), PVAL2,
Expr (_P3_), PVAL3,
Expr (_P4_), PVAL4,
Expr (_P5_), PVAL5,
Expr (_P6_), PVAL6
);
gb = Eval (gbx);
gbr = gb << report;
YAxis = gbr [Axis Box (2)];
YMax = YAxis << Get Max;
YMin = YAxis << Get Min;
gbr << close window;
YRange = ABS (YMax - YMin);
While (YRange <= 1.0,
YMax = YMax + (YRange * 0.1);
YMin = YMin - (YRange * 0.1);
YRange = abs (YMax - YMin);
);
YMax = YMax + (YRange * 0.15);
TOPY1 = YMax - (YRange * 0.1);
TOPY2 = YMax - (YRange * 0.18);
TOPY3 = YMax - (YRange * 0.26);
BOTY = YMin + (YRange *0.1);
gbx = substitute (Name Expr (gbe), Expr (_YS_), YCOL,
Expr (_STE_), STDE,
Expr (_TPY1_), TOPY1,
Expr (_TPY2_), TOPY2,
Expr (_TPY3_), TOPY3,
Expr (_BPY_), BOTY,
Expr (_LNAME_), LABEL,
Expr (_P1_), PVAL1,
Expr (_P2_), PVAL2,
Expr (_P3_), PVAL3,
Expr (_P4_), PVAL4,
Expr (_P5_), PVAL5,
Expr (_P6_), PVAL6
);
gb = Eval (gbx);
gbr = gb << report;
YAxis = gbr [Axis Box (2)];
YAxis << Max (YMax);
YAxis << Min (YMin);
YAxis << Inc (round (YRange/9, 1));
gbr << Set Title (LABEL);
gbr [TextEditBox (1)] << Set text (LABEL);
gbr [LegendBox (1)] << delete;
fb = gbr [FrameBox (1)];
if( Minimum (P1, P2, P3, P4, P5, P6)<= 0.01 &
Maximum ( abs (YCOL[2]), abs (YCOL[3]), abs (YCOL[5]), abs (YCOL[6]), abs (YCOL[8]), abs (YCOL[9]))>=0.2 &
Minimum (PPBO1, PPBO2, PPBO3, PPBO4) <= 0.01,
mylbox << append (fb),.);
gbr << close window;
);
New Window ("OUTPUT", mylbox);
Ahora, en lugar de escribir los valores P / FDR en los gráficos (consulte los PVAL insertados como elementos de texto en Graphics Script), me gustaría agregar una tabla de resumen con estos valores P / FDR debajo de cada gráfico. He examinado el comando "Agregar tabla", pero no estoy seguro de que proporcione la flexibilidad de formato que necesito y, por lo tanto, me gustaría saber si existe una forma alternativa de dibujar tablas con más flexibilidad.
Cualquier idea, sugerencia o recomendación será muy apreciada.
Gracias,
TS