<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />大家好。
我正在尝试编写一个双变量报告的脚本,其中适合的组排成2行。
下面是使用足球样本数据手动创建报告后的报告。

这是在单击一个适合组的红色箭头并选择“为所有对象保存脚本”时获得的脚本
New Window( "Football - Bivariate", V List Box( Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "db" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "db" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "db" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "dl" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "dl" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "dl" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "fb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "fb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "fb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "hb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "hb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "hb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ib" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ib" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ib" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ki" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ki" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ki" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ob" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ob" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ob" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ol" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ol" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "ol" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "qb" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "qb" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "qb" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "te" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "te" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "te" ) ), Fit Group( Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "wr" ) ), Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "wr" ) ), <<{Arrange in Rows( 2 )}, Where( :Position == "wr" ) ) ));最后,结果如下:

我不确定为什么会这样。为什么保存的脚本与保存的脚本不准确?
为什么“位置”分组出现在“适合组”框之外?
为什么下一个适合组放在该文本框旁边而不是在它下面?
如何修复此问题,或编写实际脚本来复制第一张图片?
谢谢
3年后,我终于迷失了所寻求的一般解决方案。在此之前,我一直在动态创建JMP将生成的健身组列表,然后使用xpath删除愚蠢的文本框并更新健身组的标题。即使如此,结果也不会与JMP GUI的结果完全相同,因为制作组合数据表不会在“ where”子句中为类别创建列。
如果有人在听,如果文档更好的话,这本来会容易得多。我在任何地方都找不到的东西使我相信这是可以完成的方式。人们不应该通过随机试验和错误试验来学习类似的东西。
见下文:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
//the dynamic script to do this analysis
//using the same inputs as the GUI window, with no other knowledge of the DT's contents
//The result is identical to the result generated from the GUI
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
//A lot of this was generated due to preferences I had set.
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 )
),
<<{Arrange in Rows( 2 )},
by(:age)
);
/*
The result JMP returns from "Save Script" > "To Script Window (All Objects)"
Returns a huge mess with fit groups and text boxes containing the "where" clauses
When making a combined data table of any of the resulting tables (such as means/std),
This report will *NOT* create columns with info from the "where" clauses
*/
New Window( "Big Class - Oneway",
V List Box(
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 12 ),
Where( :age == 12 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 13 ),
Where( :age == 13 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 14 ),
Where( :age == 14 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 15 ),
Where( :age == 15 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 16 ),
Where( :age == 16 )
),
Fit Group(
Bivariate( Y( :height ), X( :weight ), Automatic Recalc( 1 ) ),
Oneway(
Y( :height ),
X( :sex ),
Automatic Recalc( 1 ),
Means and Std Dev( 1 ),
Box Plots( 1 ),
Mean Diamonds( 1 ),
Mean Error Bars( 1 ),
Std Dev Lines( 1 ),
X Axis Proportional( 0 ),
Points Jittered( 1 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg( Box Plot Seg( 1 ), Line Color( "Red" ) ),
DispatchSeg( Box Plot Seg( 2 ), Line Color( "Red" ) )}
)
)
),
<<{Arrange in Rows( 2 )},
Where( :age == 17 ),
Where( :age == 17 )
)
)
);