複数の寿命分布プロットをフォーマットする皆さんこんにちは。軸スケールをフォーマットし、JMP がこのコードの出力として表示する 4 つの寿命分布プロットにターゲットを適用しようとしています。
myld は、4 つのライフ分布を持つウィンドウを参照します。
タイトルで検索して、ウィンドウにライフ分布があるかどうかを調べ、これら 4 つのライフ分布をループ処理しようとしています。
次に、それぞれのワイブル プロットの x 軸と y 軸を変更します。
どういうわけか、コードは最初のプロットのみを変更し、残りの 3 つは変更されません。おそらく、残りのプロットのハンドルを正しく取得できないのでしょう。
私がやろうとしていることを実現するために、このコードを修正するのを手伝ってくれる人はいますか。
Better if the "Add Ref Line(2 " can be turned into a variable so I can supply 2 as an argument.
したがって、for ループ内の 4 つのプロットすべてに異なる参照線を追加できます。これらの値は、ループを実行する前にリストに格納できます。
ありがとう
myld = Life Distribution(
Perspective( Compare Groups ),
Y( :Voltage ),
Grouping( :flavor ),
By( :A, :B, :C, :D),
Confidence Interval Method( Likelihood ),
Select Distribution( Distribution, Weibull ),
Select Scale( Weibull ),
Tabbed Report( 0 ),
Show Confidence Area( 0 )
);
report_windows = Get Window List( "myld" );//; << Get Window Title
report_of_interest = Empty();
For Each( {report_window}, report_windows,
outline_title = Try( report_window[Outline Box( 1 )] << get title, "" );
If( Starts With( outline_title, "Life Distribution" ),
print(outline_title);
report_of_interest = report_window;
ref = report_window[Outline Box( 1 )] << Get Scriptable Object;
xaxis = Report( ref )[axis box( 2 )];
xaxis << Axis Settings(
Format( "Precision", 6, 2 ),
Min( 1 ),
Max( 5 ),
Inc( 0.01 ),
Minor Ticks( 1 ),
Add Ref Line(2, "Dotted", "Black", "", 2 ),
Label Row( {Major Grid Line Color( "Light Yellow" ), Show Major Grid( 1 )} )
);
yaxis = Report( ref )[axis box( 1 )];
yaxis << Axis Settings(
Min( 0 ),
Max( 1 ),
Inc( 0.1 ),
Minor Ticks( 0 ),
Add Ref Line(0.5, "Dotted", "Black", "", 2 )
);
);
);自動化とスクリプト基本的なデータ分析とモデリング信頼性分析Re: 複数の寿命分布プロットのフォーマット すべてのプラットフォーム オブジェクトのリストですか?
ヘルパー キー「Life Distribution」を持つオブジェクトは多数あります。一番上のオブジェクトを選択してください。
そしてそこから最初のFrameBoxです。
OBs = (Current Report() << xpath( "//OutlineBox[@helpKey and not(ancestor::OutlineBox[@helpKey])]" ))
For Each({OB}, OBs,
xaxis = OB[axis box( 2 )];
xaxis << Axis Settings(
Format( "Precision", 6, 2 ),
Min( 1 ),
Max( 5 ),
Inc( 0.01 ),
Minor Ticks( 1 ),
Add Ref Line(2, "Dotted", "Black", "", 2 ),
Label Row( {Major Grid Line Color( "Light Yellow" ), Show Major Grid( 1 )} )
);
yaxis = OB[axis box( 1 )];
yaxis << Axis Settings(
Min( 0 ),
Max( 1 ),
Inc( 0.1 ),
Minor Ticks( 0 ),
Add Ref Line(0.5, "Dotted", "Black", "", 2 )
);
);Re: 複数の寿命分布プロットのフォーマットJMP のバージョンに応じて、さまざまなオプションがあります (私は JMP18 を前提としています)。プラットフォームで By 列を使用すると、プラットフォームのリストが返され、それをループすることができます (XPath を使用してリストを取得することもできます)。通常、私は非常に堅牢な OutlineBox を見つけて、それを使用してインデックスを「結び付ける」ようにしています。
これはあなたがやっていることとまったく同じではありませんが、何ができるかについていくつかのアイデアを与えるはずです。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Reliability/Fan.jmp");
dt << New Column("Group", Nominal, Numeric, Formula(Row() <= 35));
lds = dt << Life Distribution(Y(:Time), Censor(:Censor), By(:Group));
refs = Associative Array();
refs["0"] = 0.2;
refs["1"] = 0.4;
// show(lds);
For Each({ld}, lds,
rep = Report(ld);
grouptitle = rep << get title;
// show(rep << get title);
groupname = Word(-1, grouptitle, "=");
// Be careful with axis indices as there can be "hidden" axis
yaxis = rep[Outline Box("Compare Distributions"), AxisBox(1)];
xaxis = rep[Outline Box("Compare Distributions"), AxisBox(2)];
// Two methods shown here
xaxis << Min(1000) << Max(12000) << Inc(1000) << Format("Precision", 6, 2) << Minor Ticks(1) << Label Row(
{Major Grid Line Color("Light Yellow"), Show Major Grid(1)}
);
yaxis << Axis Settings(
Format("Precision", 6, 2),
Min(0),
Max(1),
Inc(0.1),
Minor Ticks(1),
Add Ref Line(refs[groupname], "Dotted", "Black", "", 2)
);
);

Re: 複数の寿命分布プロットのフォーマットありがとうございます。感謝します。