グラフビルダー要素ループ関数複数の位置定義にループ関数を使用するにはどうすればよいですか?
以下のように分離すると動作します:
Eval(
Substitute(
Expr(
gb = cdt << Graph Builder(
Size( 600, 800 ),
Show Control Panel( 0 ),
vvv,
Elements(Position( 1, 1 ),
Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 3 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 4 ) )
),
Elements(
Position( 2, 1 ),
Box Plot( X, Y, Outliers( 0 ) ),
Points( X, Y ),
Bar( X, Y, Bar Style( "Float" ), Label( "Label by Value" ) ),
Legend( 6 )
),
Elements(
Position( 2, 2 ),
Box Plot( X, Y, Outliers( 0 ) ),
Points( X, Y ),
Bar( X, Y, Bar Style( "Float" ), Label( "Label by Value" ) ),
Legend( 7 )
),
Elements(
Position( 2, 3 ),
Box Plot( X, Y, Outliers( 0 ) ),
Points( X, Y ),
Bar( X, Y, Bar Style( "Float" ), Label( "Label by Value" ) ),
Legend( 8 )
)
)
),
Expr( vvv ),
Name Expr( var expr )
)
);しかし、このようにループを使用する場合、バーしかありません。このコードには何が欠けているのでしょうか?
Eval(
Substitute(
Expr(
gb = cdt << Graph Builder(
Size( 600, 800 ),
Show Control Panel( 0 ),
vvv,
Elements(Position( 1, 1 ),
Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 3 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 4 ) )
),
For( j = 1, j <= n_mydatecol, j++,
Elements(
Position( 2, j ),
Box Plot( X, Y, Outliers( 0 ) ),
Points( X, Y ),
Bar( X, Y, Bar Style( "Float" ), Label( "Label by Value" ) ),
Legend(eval( 5 + j ))
),
),
)
),
Expr( vvv ),
Name Expr( var expr )
)
);
自動化とスクリプトウィンドウズRe: グラフビルダー要素ループ関数要素式を別々に構築し、グラフビルダー式内で評価することもできます。または、<<要素の追加を使用する方が簡単な場合もあります。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = Graph Builder(Variables(X(:height), Y(:weight)), Elements(Points(X, Y), Smoother(X, Y)));
Wait(0.5);
gb << Add Element(1, 1, {Type("Line Of Fit"), X, Y, Degree("Quadratic")});Re: グラフビルダー要素ループ関数私のチャートをこのようにしたいのですが、位置を定義する必要がありますか?

Re: グラフビルダー要素ループ関数要素を追加すると、X 位置と Y 位置を設定できます。自分のユースケースで機能するかどうか試しましたか?
Re: グラフビルダー要素ループ関数こんにちは、ジャルモさん。
以下のコードを使用しようとしましたが、ボックス プロットのみが表示されます。バーとラベルを表示するにはどうすればよいでしょうか。

Eval(
Substitute(
Expr(
gb = cdt << Graph Builder(
Size( 1200, 800 ),
Show Control Panel( 0 ),
vvv,
Elements(
Position( 1, 1 ),
Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 3 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 4 ) )
)
);
// Loop to add repetitive elements
For( i = 2, i <= 10, i++,
gb << Add Elements(
Position( 2, i ),
Box Plot( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 2 * i + 1 ) ),
Bar( X, Y, Legend( 2 * i + 2 ), Bar Style( "Float" ), Label( "Label by Value" ), Label Format( "Fixed Dec", 5, 2 ) )
);
);
),
Expr( vvv ),
Name Expr( var expr )
)
);
Re: グラフビルダー要素ループ関数サンプルデータを作成し(または適切なデータを見つけて)、グラフを再作成する必要があるため、時間がかかります。
Re: グラフビルダー要素ループ関数すべての画像が以前とはまったく異なるものに変わったことがわかります... 提供されたスクリプトがこれらの新しい画像にどの程度対応しているかはわかりません。どの列をどこに動的に追加する必要がありますか?
このグラフビルダースクリプト

こんな感じです
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(528, 454),
Show Control Panel(0),
Variables(X(:height), X(:sex), Y(:weight)),
Elements(
Position(1, 1),
Points(X, Y, Legend(5)),
Smoother(X, Y, Legend(6)),
Line Of Fit(X, Y, Legend(8))
),
Elements(
Position(2, 1),
Points(X, Y, Legend(18)),
Bar(X, Y, Legend(19), Bar Style("Float"), Label("Label by Value"))
)
);
このようなプロットがあり、右側にポイント付きのフロートバーチャートを追加したい場合は、

要素を追加することができます
gb << Add Element(2, 1, {Type("Bar"), X, Y, Bar Style("Float"), Label("Label by Value")});
もっと見る...
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(528, 454),
Show Control Panel(0),
Variables(X(:height), X(:sex), Y(:weight)),
Elements(
Position(1, 1),
Points(X, Y, Legend(5)),
Smoother(X, Y, Legend(6)),
Line Of Fit(X, Y, Legend(8))
),
Elements(
Position(2, 1),
Points(X, Y, Legend(18))
)
);
gb << Add Element(2, 1, {Type("Bar"), X, Y, Bar Style("Float"), Label("Label by Value")});
Re: グラフビルダー要素ループ関数こんにちは、ジャルモさん。
ご協力ありがとうございます。y 軸が 1 つしかない場合は機能しますが、複数の y 軸がある場合でも、ループ関数を使用してボックス プロットとバーを含む要素を作成できますか? 最初の方法のように試しましたが、バーのないボックス プロットのみが表示されました。
Re: グラフビルダー要素ループ関数何をプロットしているのかわかりませんが、うまくいくかもしれません(またはうまくいかないかもしれません)。ここでは、要素の追加を使用して、X軸2とY軸1と2に棒グラフを追加しています。
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
gb = dt << Graph Builder(
Size(528, 454),
Show Control Panel(0),
Variables(X(:height), X(:sex), Y(:name), Y(:weight)),
Elements(Position(1, 1), Points(X, Y, Legend(20))),
Elements(
Position(1, 2),
Points(X, Y, Legend(5)),
Smoother(X, Y, Legend(6)),
Line Of Fit(X, Y, Legend(8))
),
Elements(Position(2, 1), Points(X, Y, Legend(19))),
Elements(Position(2, 2), Points(X, Y, Legend(18)))
);
gb << Add Element(2, 1, {Type("Bar"), X, Y, Bar Style("Float"), Label("Label by Value")});
gb << Add Element(2, 2, {Type("Bar"), X, Y, Bar Style("Float"), Label("Label by Value")});

Re: グラフビルダー要素ループ関数うまくいきました。このように試してみます。
どうもありがとう
Eval(
Substitute(
Expr(
gb = cdt << Graph Builder(
Size( 600, 800 ),
Show Control Panel( 0 ),
vvv,
Elements(Position( 1, 1 ),
Points( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 3 ) ),
Smoother( X, Y( 1 ), Y( 2 ), Y( 3 ), Legend( 4 ) )
),
);
For( i = 1 , i <= n_mymetric , i++,
gb << Add Element(2, i, {Type("Bar"), X, Y, Bar Style("Float"), Label("Label by Value")});
),
),
Expr( vvv ),
Name Expr( var expr )
)
);