Establecer tamaño de marco para múltiples gráficosMi script actual me da múltiples gráficos por los diferentes productos. Que es lo que estoy buscando.
Ahora me gustaría hacer que todos esos gráficos tengan el mismo tamaño de marco. Estoy encontrando que tengo que ser específico cuando uso Dispatch y debo escribir cada nombre de esquema.
El problema con eso es que habrá diferentes productos cada vez que lo ejecute y preferiría no tener que cambiar los nombres cada vez.
Hay alguna manera de automatizar esto.
Data Table( "Data for Comparison" ) << Variability Chart(
Y( Column( "Mean(Bin_VALUE)" ) ),
X( :Bin_Size, :Status_Type2 ),
By( :Product ),
Show Box Plots( 1 ),
Std Dev Chart( 0 ),
SendToReport(
Dispatch(
{"Variability Gauge Product= Product 1", "Variability Chart for Mean(Bin_VALUE)"},
"Variability Chart",
FrameBox,
{Frame Size( 800, 240 )}
),
)
);Re: Establecer tamaño de marco para múltiples gráficosMi solución es esencialmente la misma que la de Jim. Guardé una referencia a la plataforma de trazado y luego la utilicé con subíndices para enviar el mensaje. Jim usó XPath para devolver la referencia antes de enviar el mensaje. Tendría que almacenar la referencia cuando abra cada plataforma en una lista y luego envíe el mensaje a la lista si desea utilizar mi método. Por ejemplo:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
platform = List();
p = dt << Bivariate(
Y( :weight ),
X( :height ),
);
Insert Into( platform, Report( p )[FrameBox(1)] );
p = dt << Oneway(
Y( :weight ),
X( :age ),
);
Insert Into( platform, Report( p )[FrameBox(1)] );
platform << Frame Size( 800, 240 );
La solución de Jim es más elegante.
No se mencionó anteriormente sobre la selección de cuadros de visualización para que se resalten en azul. Ese resultado se logra con el << Seleccionar mensaje.
Re: Establecer tamaño de marco para múltiples gráficosMarca,
Intenté esto pero ninguno de los gráficos cambió de tamaño. No funcionó.
Soy muy nuevo en JMP scipting, así que lo siento si esta observación no es útil, pero una cosa que noté cuando pegué tu script es que la plataforma no se volvió azul.
No estoy seguro si hay algo más que me falta.
Re: Establecer tamaño de marco para múltiples gráficosJim
Esto funciono
¿Podría usar el mismo concepto en el siguiente escenario para establecer los títulos? Sin necesidad de teclear cada uno de ellos.
Así que vete de esto
Template_TM = Expr(
TM = Oneway(
Y( Eval( TargetParameter )),
X( :Process ),
Each Pair( 1 ),
Means and Std Dev( 1 ),
t Test( 1 ),
Points Jittered( 1 ),
Box Plots( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
Comparison Circles( 1 ),
X Axis Proportional( 0),
Histograms( 0),
//Where( :PARAMETER_ID == Eval( TargetParameter )),
SendToReport(
Dispatch( {}, "Oneway Analysis of 0.12 By Process", OutlineBox(1), {Set Title( TargetProduct ||"_Oneway Analysis at_" || TargetParameter )} ),
Dispatch( {}, "Oneway Analysis of 0.16 By Process", OutlineBox(1), {Set Title( TargetProduct ||"_Oneway Analysis at_" || TargetParameter )} ),
Dispatch( {}, "Oneway Analysis of 0.2 By Process", OutlineBox(1), {Set Title( TargetProduct ||"_Oneway Analysis at_" || TargetParameter )} ),
Dispatch( {}, "Oneway Analysis of 0.3 By Process", OutlineBox(1), {Set Title( TargetProduct ||"_Oneway Analysis at_" || TargetParameter )} ),
Dispatch( {}, "1", ScaleBox, {Min( 0 ), Minor Ticks( 1 ), Add Ref Line(Eval(Limit_UCL), "Dotted", "Dark Blue", "UCL", 1)}),
Dispatch( {}, "Oneway Plot", FrameBox, ),
Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
)
);
);¿a esto?
Template_TM = Expr(
TM = Oneway(
Y( Eval( TargetParameter )),
X( :Process ),
Each Pair( 1 ),
Means and Std Dev( 1 ),
t Test( 1 ),
Points Jittered( 1 ),
Box Plots( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
Comparison Circles( 1 ),
X Axis Proportional( 0),
Histograms( 0),
//Where( :PARAMETER_ID == Eval( TargetParameter )),
SendToReport(
Dispatch( {}, "1", ScaleBox, {Min( 0 ), Minor Ticks( 1 ), Add Ref Line(Eval(Limit_UCL), "Dotted", "Dark Blue", "UCL", 1)}),
Dispatch( {}, "Oneway Plot", FrameBox, ),
Dispatch( {}, "Means Comparisons", OutlineBox, {Close( 1 )} )
)
);
);
(TM<<XPATH></XPATH>Re: Establecer tamaño de marco para múltiples gráficosEl hecho es que no estamos destinados a utilizar el Enviar a informe directiva. De esta manera, solo está pensado para que JMP pueda capturar las personalizaciones de la capa de informe cuando guarde un script. Prueba la forma recomendada:
platform = Data Table( "Data for Comparison" ) << Variability Chart(
Y( Column( "Mean(Bin_VALUE)" ) ),
X( :Bin_Size, :Status_Type2 ),
By( :Product ),
Show Box Plots( 1 ),
Std Dev Chart( 0 )
);
Report( platform )[FrameBox(1)] << Frame Size( 800, 240 );
Fácil, ¿eh?
Re: Establecer tamaño de marco para múltiples gráficosPuedes usar XPath para recuperar todos los objetos FrameBox (), y luego configurar el Tamaño del Marco para todos ellos
vc = Data Table( "Data for Comparison" ) << Variability Chart(
Y( Column( "Mean(Bin_VALUE)" ) ),
X( :Bin_Size, :Status_Type2 ),
By( :Product ),
Show Box Plots( 1 ),
Std Dev Chart( 0 ),
);
(Report(vc) << xpath("//FrameBox")) << Frame Size( 800, 240 );Re: Establecer tamaño de fotograma para varios gráficosHola txnelson,
¡Gracias por esta solución! ¿Cómo puedo usar esto para aplicar los mismos comandos DispatchSeg() a todos mis gráficos? Mi script en este momento tiene el siguiente código para TODAS mis más de 12 tramas:
Dispatch(
{"Variability Gauge Analysis for Plot1",
"Variability Chart for Plot1"},
"Variability Chart",
FrameBox,
{Frame Size( 400, 200 ),
DispatchSeg( Box Plot Seg( 1 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 3 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 4 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 5 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 6 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 7 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 8 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 9 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 10 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 11 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 12 ), Line Color( "Black" ) )
}
)Intenté esto, pero no funcionó:
fb = {Frame Size( 400, 200 ),
DispatchSeg( Box Plot Seg( 1 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 3 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 4 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 5 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 6 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 7 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 8 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 9 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 10 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 11 ), Line Color( "Black" ) ),
DispatchSeg( Box Plot Seg( 12 ), Line Color( "Black" ) )
};
(Report(vc) << xpath("//FrameBox")) << fb;¡Gracias de antemano!
Re: Establecer tamaño de fotograma para varios gráficosde:
https://community.jmp.com/t5/Discussions/Change-the-default-color-of-box-plot-lines/mp/762414/highlight/true#M94163
Names Default to Here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
myPlot = Variability Chart(
Y( :height ),
X( :age ),
Variability Analysis( :height, Show Box Plots( 1 ) )
);
mySegs=report(myPlot)[FrameBox(1)]<< find segs; // get all display elements
Filter Each({seg},(mySegs), (seg<< class name)=="BoxPlotSeg") //just keep the Box Plots
<< Set Line Color("Black")