¿Cómo fusiono dos tipos diferentes de gráficos horizontalmente en un diario?
////////////////////////////////////////Makes 'N' overlay plots. One each for each "Parameter Name"////////////////////////////////////////////////////////
overlayplot = table1 << Overlay Plot(
X( :column1 ),
Y( :Name( "Mean(Parameter Value)" ) ),
Grouping( :GROUP ),
SendToByGroup(
{:Parameter Name == Eval( :Parameter Name )},
Overlay Groups,
Connect Thru Missing( 1 ),
Connect Points( 1 ),
:Name( "Mean(Parameter Value)" )(Overlay Marker( 8 ), Line Width( "Thick" ))
),
By( :Parameter Name ),
);
////////////////////////////////////////Makes 'N' Oneway plots. One each for each "Parameter Name"////////////////////////////////////////////////////////
ttest_plot = table1 << Oneway(
Y( :Name( "Mean(Parameter Value)" ) ),
X( :GROUP ),
Plot Quantile by Actual( 1 ),
Line of Fit( 0 ),
Box Plots( 1 ),
Mean Diamonds( 0 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg(
Box Plot Seg( 1 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ),
Shortest Half Bracket( 0 ), Line Color( "Red" )}
), DispatchSeg(
Box Plot Seg( 2 ),
{Box Type( "Outlier" ), Confidence Diamond( 0 ),
Shortest Half Bracket( 0 ), Line Color( "Red" )}
)}
)
),
By( :Parameter Name )
);
El código anterior genera el mismo número de gráficos superpuestos y unidireccionales a partir de mis datos. Hay 84 "nombres de parámetros" únicos, por lo que obtengo 84 gráficos superpuestos y 84 gráficos unidireccionales.
Estoy tratando de combinarlos en un diario para que, para cada parámetro, obtenga el gráfico unidireccional justo al lado del gráfico de superposición ... y luego los gráficos posteriores verticalmente.
¿Cómo puedo hacer eso?
Esta es la salida que necesito

Esta es la salida que estoy obteniendo

@txnelson #JMP
GráficosScriptingRe: ¿Cómo fusiono dos tipos diferentes de gráficos horizontalmente en un diario?Puede intentar usar H List Box para configurarlos uno al lado del otro, pero lo más probable es que tenga algunos problemas con el tamaño de los diferentes informes y tenga que manejar eso de alguna manera. A continuación se muestra un ejemplo con dos opciones diferentes que podrían dar una idea de cómo hacer esto (realmente no he usado revistas, por lo que parte del ejemplo podría ser un poco malo):
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
/*with by*/
graph1 = Expr(dt << Oneway(Y(:height), X(:age), By(:sex)));
graph2 = Expr(dt << Graph Builder(
Show Control Panel(0),
Show Legend(0),
Variables(X(Transform Column("Row", Formula(Row()))), Y(:height), Group Y(:age)),
Elements(Points(X, Y, Legend(1))),
By(:sex)
));
nw = new window("",
h list box(
vlistbox(graph1),
vlistbox(graph2)
)
);
nw << journal window;
nw << close window;
stop();
/* without by*/
graph1 = Expr(dtTemp << Oneway(Y(:height), X(:age)));
graph2 = Expr(dtTemp << Graph Builder(
Show Control Panel(0),
Show Legend(0),
Variables(X(Transform Column("Row", Formula(Row()))), Y(:height), Group Y(:age)),
Elements(Points(X, Y, Legend(1)))
));
nw = new window("",
vlb = v list box();
);
nw << Journal Window;
nw << close window;
byVals = Associative Array(dt:sex) << get keys;
For(i = 1, i <= N Items(byVals), i++,
dt << Select Where(:sex == byVals[i]);
dtTemp = dt << Subset(Selected Rows, all columns);
hlb = V List Box(
TextBox(byVals[i]),
Lineup box(N Col(2),
graph1,
graph2
)
);
hlb << Journal;
Close(dtTemp, no save);
);
Re: ¿Cómo fusiono dos tipos diferentes de gráficos horizontalmente en un diario?Aquí hay una reelaboración de su guión que creo que le dará un buen comienzo en su guión.

Names Default To Here( 1 );
dt = Open( "$sample_data/big class.jmp" );
overlayplot = dt << Overlay Plot(invisible,
X( :height ),
Y( :Name( "weight" ) ),
Grouping( :sex ),
SendToByGroup(
{:age == Eval( :age )},
Overlay Groups,
Connect Thru Missing( 1 ),
Connect Points( 1 ),
:Name( "weight" )(Overlay Marker( 8 ), Line Width( "Thick" ))
),
By( :age )
);
////////////////////////////////////////Makes 'N' Oneway plots. One each for each "Parameter Name"////////////////////////////////////////////////////////
ttest_plot = dt << Oneway(invisible,
Y( :weight ),
X( :sex ),
Normal Quantile Label( 0 ),
Box Plots( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
by( :age ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg(
Box Plot Seg( 1 ),
{Confidence Diamond( 0 ), Line Color( "Red" )}
), DispatchSeg(
Box Plot Seg( 2 ),
{Confidence Diamond( 0 ), Line Color( "Red" )}
)}
)
)
);
// Create the output window
nw = new window("The Output", lub = lineup Box( NCol(2)));
// Find the numeber of by groupws
summarize(dt, bygroups = by(:age));
numByGroups = nitems(bygroups);
For(i=1,i<=numByGroups,i++,
lub<<APPEND></APPEND>
Nota: reduje manualmente el tamaño de los gráficos de superposición, deberá agregar el JSL para establecer el tamaño del marco correctamente.
Re: ¿Cómo fusiono dos tipos diferentes de gráficos horizontalmente en un diario?Gracias. Funcionó perfectamente. Solo necesitaba establecer el tamaño del marco.