我刚刚开始使用 JMP 17(不确定这是否相关),但在某些情况下我无法更改生命分布平台中线路的任何属性。
我在数据表中附加了一个脚本来生成威布尔图。 请注意,我最初更改脚本中的颜色以反映行状态,这显然是有效的。但一旦平台开放,我就无法再改变任何事情。 在脚本中,我已经尝试将线宽设置为 3,但这也不起作用(这确实适用于 JMP16.2 中的此脚本)。

编辑:
下面的代码实现了我想要的功能,与 JMP16 相比,它不是很漂亮,但我想它可以工作。
dt = open ("$SAMPLE_DATA\reliability\blenders.jmp");
New Column( "By",
Character,
"Nominal",
Set Selected,
Set Values(
{"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
"A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
"B", "B", "B", "B", "B", "B", "B", "B", "A", "A", "A", "A", "A", "A",
"A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "A",
"A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B",
"B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B", "B",
"B", "B", "B", "B", "B", "B"}
)
);
ld = dt << Life Distribution(
Perspective( Compare Groups ),
Y( :Time Cycles ),
Grouping( :Group ),
Confidence Interval Method( Wald ),
Select Distribution( Distribution, Weibull ),
Select Scale( Weibull ),
Tabbed Report( 0 ),
By("By")
);
Summarize( uniqueGroups = by( "Group" ) );
numGroups = N Items( uniqueGroups );
Summarize( uniqueBy = by( "By" ) );
numPlatforms = N Items( uniqueBy );
For( i = 1, i < numPlatforms + 1, i++,
For( j = 1, j < numPlatforms + 1, j++,
ld[i] << SendToReport(Dispatch(
"Compare Distribution",
"11111",
ScaleBox,
{Legend Model(
11111,
Properties(
0,
{Line Color( 6 ), Line Style( "Dashed" ), Line Width( 6 )}, // <-- Change line properties
Item ID( Eval( "Group=" || uniqueGroups[j] ), 1 )
)
);
};
);
);
);
);您好,感谢您的建议,但您的代码中有硬编码名称(group=Automatic 在调度中)。 这些列值事先是未知的,因此就自动脚本而言,这是行不通的。
我们可以使用 box 路径或 xpath 来消除命名依赖吗? 当我将下面的代码放在您的脚本之后时,它不起作用(为了便于阅读,我取出了您的一些调度)
dt = open ("$SAMPLE_DATA\reliability\blenders.jmp");
ld = dt << Life Distribution(
Perspective( Compare Groups ),
Y( :Time Cycles ),
Grouping( :Group ),
Confidence Interval Method( Wald ),
Select Distribution( Distribution, Weibull ),
Select Scale( Weibull ),
Tabbed Report( 0 ),
);
Report(ld)["Compare Distribution",AxisBox(2)]<<{Min(200)}; // Changing x-axis range works as expected
Report(ld)["Compare Distribution",LegendBox(1)] << {Line Width(3)}; // doesn't work, wrong syntax?
legendBoxes = Report( ld )["Life Distribution - Compare Groups - Time Cycles"]["Compare Distribution"] <<
Xpath( "//LegendBox" );
legendBoxes << {"Line Width",3}; // Also doesn't work
是的,可以通过脚本实现。 下面代码的第 33 行有一个示例。
dt = open ("$SAMPLE_DATA\reliability\blenders.jmp");
ld = dt << Life Distribution(
Perspective( Compare Groups ),
Y( :Time Cycles ),
Grouping( :Group ),
Confidence Interval Method( Wald ),
Select Distribution( Distribution, Weibull ),
Select Scale( Weibull ),
Tabbed Report( 0 ),
SendToEmbeddedScriptable(
Dispatch(
{"Individual Group", "Life Distribution Group=Automatic"},
{Y( :Time Cycles ), <<FIT weibull=""></FIT>您好,在 JMP 16 中我自动生成了这些图表。 因此,右键单击图例并手动更改所有线宽不是一种选择。
有没有办法将此线宽属性发送到 legendBox?
你是对的。 JMP17 中的行为已发生变化。 在 JMP17 中,图例是可单击的,相应的图形元素可以隐藏/显示。 这可能导致自定义中发生意外的行为变化。
但目前,我建议使用图例来定制。 即右键单击图例,将显示一个弹出菜单,让您更改颜色、线条样式、线条宽度。
当我在生命分布平台中选择“生命分布”选项卡时,我可以对图表进行更改,但当我选择生命分布平台的“比较组”选项卡时,我无法对图表进行更改。 这也许可以解释为什么@马克贝利和@mvanderaa得到不同的结果,因为马克的示例使用“生命分布”选项卡。 同样,在 Fit Life by X 平台中,我无法更改线宽或颜色(不过我可以更改点的颜色)。 我想知道这是否是开发人员所期望的行为。
在常规分布平台中可以有一个潜在的解决方法,您可以在其中拟合威布尔分布,查看 QQ 图,然后单独自定义图,之后您可以从一个图中复制框架内容并将其粘贴到另一个图中以获取它们两者都叠加在一张图表上。 下面的脚本准备好在您提供的数据表上进行复制/粘贴(我没有包括复制/粘贴位,因为最终产品中的图表看起来很混乱——太多了,以至于我几乎没有包括这个作为可能的解决方法)。
Distribution(
SendToByGroup( {:Side == "Bottom"} ),
Continuous Distribution(
Column( :Y ),
Histogram( 0 ),
Fit Weibull( QQ Plot( 1 ) )
),
Histograms Only,
By( :Side ),
SendToByGroup(
{:Side == "Bottom"},
SendToReport(
Dispatch(
{"Distributions Side=Bottom", "Y"},
"Compare Distributions",
OutlineBox,
{Close( 1 )}
)
)
),
SendToByGroup(
{:Side == "Top"},
SendToReport(
Dispatch(
{"Distributions Side=Top", "Y"},
"Compare Distributions",
OutlineBox,
{Close( 1 )}
),
Dispatch(
{"Distributions Side=Top", "Y", "Fitted Weibull Distribution",
"QQ Plot"},
"FitDistributions",
FrameBox,
{DispatchSeg( Line Seg( 1 ), {Line Color( "Green" )} ),
DispatchSeg( Line Seg( 2 ), {Line Color( "Green" )} )}
)
)
)
)
我以前从未执行过这些更改,但您可以使用 JMP 17 完成这些更改。 我手动自定义了估计行,然后保存了脚本。 这里是:
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
obj = dt << Life Distribution(
Y( :weight ),
<<FIT weibull=""></FIT>