こんにちは
グラフ内のデータポイントを特定の順序で接続しようとしています(ダイヤモンドプロットの作成など)。 line を使用して手動で接続し、スクリプトをエクスポートすると、(X,Y) 座標の line 関数が使用されていることがわかります。 誰か手伝ってくれませんか
1. これら (X,Y) はフレーム座標だと思いますか?
2. 1. が true の場合、JSL を使用してそれら (X,Y) を確認するにはどうすればよいですか? より具体的には、グラフ内の各データ ポイントのアウト フレーム (X,Y) を抽出する方法に関する構文を知る必要がありますか?
JMP でデータ ポイントを接続する他の効率的な方法はありますか?


どうもありがとう
スクリプトを少し調整しましたが、主な問題は、コードが Group1、Group2、Group3 のすべての組み合わせを持っていると想定しているのに、提供されたデータにはそれが存在しないため、プログラムが分析するデータを見つけることができないことです。 。
names default to here(1);
dtt = Current Data Table();
Summarize( dtt, byGroup1 = by( :var1 ) );
Summarize( dtt, byGroup2 = by( :var2 ) );
Summarize( dtt, byGroup3 = by( :var3 ) );
For( ii = 1, ii < N Items( byGroup1 ), ii++,
For( jj = 1, jj < N Items( byGroup2 ), jj++,
For( kk = 1, kk < N Items( byGroup3 ), kk++,
dtt << select where( :var1 == byGroup1[ii] & :var2 == byGroup2[jj] & :var3 == byGroup3[kk] );
show(ii,jj,kk,bygroup1[ii],bygroup2[jj],bygroup3[kk]);
sel = dtt << get selected rows;
If( n rows(sel) > 0,
show("inside",ii,jj,kk);
dt = dtt << subset( selected rows(1), selected columns(0));
gb = dt << Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :x axis ), Y( :y axis ), Overlay( :legend ) ),
Elements( Points( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"x axis",
ScaleBox,
{Format( "Best", 12 ), Min( 2.273568 ), Max( 3.00134902479339 ), Inc( 0.1 ), Minor Ticks( 0 )}
)
)
);
// Add a simple graphics script to connect the points
Report( gb )[FrameBox( 1 )] << add graphics script(
Summarize( dt, byGroup = by( :legend ) );
colorList = {"Blue", "Red", "Green"};
Fill Pattern( [0] );
For( i = 1, i <= N Items( byGroup ), i++,
Pen Color( colorList[i] );
theRows = dt << get rows where( :legend == byGroup[i] & :Label != "i" );
// Add the first value as the last value to complete the object
theRows = theRows |/ theRows[1];
xMatrix = :x axis[theRows];
yMatrix = :y axis[theRows];
Line( xMatrix, yMatrix );
);
););
)
)
);大変お世話になり、誠にありがとうございました。 大変感謝しております。 もう一つ質問があるのですが、教えていただければ幸いです。
多くのサブセット (私が送ったテーブル) で構成され、さらに 3 つの追加列で制御される大きなテーブルがあります。 テーブルのサブセット(それぞれ私が送ったものと同じもの)を作成し、3つのForループ内に以下のコードを適用しようとしていました。 何らかの理由で、サブセット テーブルの生成が機能しません。
dtt = Current Data Table();
Summarize( dtt, byGroup1 = by( :var1 ) );
Summarize( dtt, byGroup2 = by( :var2 ) );
Summarize( dtt, byGroup3 = by( :var3 ) );
For( ii = 1, ii < N Items( byGroup1 ), ii++,
For( jj = 1, jj < N Items( byGroup2 ), jj++,
For( kk = 1, kk < N Items( byGroup3 ), kk++,
dt = dtt << subset(
select where( :var1 == byGroup1[ii] & :var2 == byGroup2[jj] & :var3 == byGroup3[kk] )
);
gb = dt << Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :x axis ), Y( :y axis ), Overlay( :legend ) ),
Elements( Points( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"x axis",
ScaleBox,
{Format( "Best", 12 ), Min( 2.273568 ), Max( 3.00134902479339 ), Inc( 0.1 ),
Minor Ticks( 0 )}
)
)
);
// Add a simple graphics script to connect the points
Report( gb )[FrameBox( 1 )] << add graphics script(
Summarize( dt, byGroup = by( :legend ) );
colorList = {"Blue", "Red", "Green"};
Fill Pattern( [0] );
For( i = 1, i <= N Items( byGroup ), i++,
Pen Color( colorList[i] );
theRows = dt << get rows where( :legend == byGroup[i] & :Label != "i" );
// Add the first value as the last value to complete the object
theRows = theRows |/ theRows[1];
xMatrix = :x axis[theRows];
yMatrix = :y axis[theRows];
Line( xMatrix, yMatrix );
);
);
);
);
);
| X軸 |
y軸 |
ラベル |
伝説 |
var1 |
var2 |
var3 |
| 2.385649 |
2.260832 |
ある |
セット1 |
con1 |
con11 |
con111 |
| 2.385782 |
2.261566 |
ある |
セット2 |
con1 |
con11 |
con111 |
| 2.418368 |
2.291898 |
ある |
セット3 |
con1 |
con11 |
con111 |
| 2.297858 |
2.445948 |
b |
セット1 |
con1 |
con11 |
con111 |
| 2.297908 |
2.446336 |
b |
セット2 |
con1 |
con11 |
con111 |
| 2.331846 |
2.475788 |
b |
セット3 |
con1 |
con11 |
con111 |
| 2.385649 |
2.649821 |
c |
セット1 |
con1 |
con11 |
con111 |
| 2.385782 |
2.649944 |
c |
セット2 |
con1 |
con11 |
con111 |
| 2.418368 |
2.674239 |
c |
セット3 |
con1 |
con11 |
con111 |
| 2.587473 |
2.730171 |
d |
セット1 |
con1 |
con11 |
con111 |
| 2.587765 |
2.730239 |
d |
セット2 |
con1 |
con11 |
con111 |
| 2.618502 |
2.753243 |
d |
セット3 |
con1 |
con11 |
con111 |
| 2.817405 |
2.649821 |
e |
セット1 |
con1 |
con11 |
con111 |
| 2.817657 |
2.649944 |
e |
セット2 |
con1 |
con11 |
con111 |
| 2.839774 |
2.674239 |
e |
セット3 |
con1 |
con11 |
con111 |
| 2.905865 |
2.445948 |
f |
セット1 |
con1 |
con11 |
con111 |
| 2.90615 |
2.446336 |
f |
セット2 |
con1 |
con11 |
con111 |
| 2.925915 |
2.475788 |
f |
セット3 |
con1 |
con11 |
con111 |
| 2.817405 |
2.260832 |
g |
セット1 |
con1 |
con11 |
con111 |
| 2.817657 |
2.261566 |
g |
セット2 |
con1 |
con11 |
con111 |
| 2.839774 |
2.291898 |
g |
セット3 |
con1 |
con11 |
con111 |
| 2.587473 |
2.181713 |
h |
セット1 |
con1 |
con11 |
con111 |
| 2.587765 |
2.182677 |
h |
セット2 |
con1 |
con11 |
con111 |
| 2.618502 |
2.213788 |
h |
セット3 |
con1 |
con11 |
con111 |
| 2.587473 |
2.445948 |
私 |
セット1 |
con1 |
con11 |
con111 |
| 2.587765 |
2.446336 |
私 |
セット2 |
con1 |
con11 |
con111 |
| 2.618502 |
2.475788 |
私 |
セット3 |
con1 |
con11 |
con111 |
| 2.624214 |
2.486915 |
ある |
セット1 |
コン2 |
con22 |
コン222 |
| 2.62436 |
2.487723 |
ある |
セット2 |
コン2 |
con22 |
コン222 |
| 2.660205 |
2.521088 |
ある |
セット3 |
コン2 |
con22 |
コン222 |
| 2.527644 |
2.690543 |
b |
セット1 |
コン2 |
con22 |
コン222 |
| 2.527699 |
2.69097 |
b |
セット2 |
コン2 |
con22 |
コン222 |
| 2.565031 |
2.723367 |
b |
セット3 |
コン2 |
con22 |
コン222 |
| 2.624214 |
2.914803 |
c |
セット1 |
コン2 |
con22 |
コン222 |
| 2.62436 |
2.914938 |
c |
セット2 |
コン2 |
con22 |
コン222 |
| 2.660205 |
2.941663 |
c |
セット3 |
コン2 |
con22 |
コン222 |
| 2.84622 |
3.003188 |
d |
セット1 |
コン2 |
con22 |
コン222 |
| 2.846542 |
3.003263 |
d |
セット2 |
コン2 |
con22 |
コン222 |
| 2.880352 |
3.028567 |
d |
セット3 |
コン2 |
con22 |
コン222 |
| 3.099146 |
2.914803 |
e |
セット1 |
コン2 |
con22 |
コン222 |
| 3.099423 |
2.914938 |
e |
セット2 |
コン2 |
con22 |
コン222 |
| 3.123751 |
2.941663 |
e |
セット3 |
コン2 |
con22 |
コン222 |
| 3.196452 |
2.690543 |
f |
セット1 |
コン2 |
con22 |
コン222 |
| 3.196765 |
2.69097 |
f |
セット2 |
コン2 |
con22 |
コン222 |
| 3.218507 |
2.723367 |
f |
セット3 |
コン2 |
con22 |
コン222 |
| 3.099146 |
2.486915 |
g |
セット1 |
コン2 |
con22 |
コン222 |
| 3.099423 |
2.487723 |
g |
セット2 |
コン2 |
con22 |
コン222 |
| 3.123751 |
2.521088 |
g |
セット3 |
コン2 |
con22 |
コン222 |
| 2.84622 |
2.399884 |
h |
セット1 |
コン2 |
con22 |
コン222 |
| 2.846542 |
2.400945 |
h |
セット2 |
コン2 |
con22 |
コン222 |
| 2.880352 |
2.435167 |
h |
セット3 |
コン2 |
con22 |
コン222 |
| 2.84622 |
2.690543 |
私 |
セット1 |
コン2 |
con22 |
コン222 |
| 2.846542 |
2.69097 |
私 |
セット2 |
コン2 |
con22 |
コン222 |
| 2.880352 |
2.723367 |
私 |
セット3 |
コン2 |
con22 |
コン222 |
| 2.743496 |
2.599957 |
ある |
セット1 |
con3 |
con32 |
con33 |
| 2.743649 |
2.600801 |
ある |
セット2 |
con3 |
con32 |
con33 |
| 2.781123 |
2.635683 |
ある |
セット3 |
con3 |
con32 |
con33 |
| 2.642537 |
2.81284 |
b |
セット1 |
con3 |
con32 |
con33 |
| 2.642594 |
2.813286 |
b |
セット2 |
con3 |
con32 |
con33 |
| 2.681623 |
2.847156 |
b |
セット3 |
con3 |
con32 |
con33 |
| 2.743496 |
3.047294 |
c |
セット1 |
con3 |
con32 |
con33 |
| 2.743649 |
3.047436 |
c |
セット2 |
con3 |
con32 |
con33 |
| 2.781123 |
3.075375 |
c |
セット3 |
con3 |
con32 |
con33 |
| 2.975594 |
3.139697 |
d |
セット1 |
con3 |
con32 |
con33 |
| 2.97593 |
3.139775 |
d |
セット2 |
con3 |
con32 |
con33 |
| 3.011277 |
3.166229 |
d |
セット3 |
con3 |
con32 |
con33 |
| 3.240016 |
3.047294 |
e |
セット1 |
con3 |
con32 |
con33 |
| 3.240306 |
3.047436 |
e |
セット2 |
con3 |
con32 |
con33 |
| 3.26574 |
3.075375 |
e |
セット3 |
con3 |
con32 |
con33 |
| 3.341745 |
2.81284 |
f |
セット1 |
con3 |
con32 |
con33 |
| 3.342073 |
2.813286 |
f |
セット2 |
con3 |
con32 |
con33 |
| 3.364802 |
2.847156 |
f |
セット3 |
con3 |
con32 |
con33 |
| 3.240016 |
2.599957 |
g |
セット1 |
con3 |
con32 |
con33 |
| 3.240306 |
2.600801 |
g |
セット2 |
con3 |
con32 |
con33 |
| 3.26574 |
2.635683 |
g |
セット3 |
con3 |
con32 |
con33 |
| 2.975594 |
2.50897 |
h |
セット1 |
con3 |
con32 |
con33 |
| 2.97593 |
2.510079 |
h |
セット2 |
con3 |
con32 |
con33 |
| 3.011277 |
2.545856 |
h |
セット3 |
con3 |
con32 |
con33 |
| 2.975594 |
2.81284 |
私 |
セット1 |
con3 |
con32 |
con33 |
| 2.97593 |
2.813286 |
私 |
セット2 |
con3 |
con32 |
con33 |
| 3.011277 |
2.847156 |
私 |
セット3 |
con3 |
con32 |
con33 |
単純なグラフィックス スクリプトをグラフ ビルダー オブジェクトに追加すると、必要なものを取得できます。

names default to here(1);
// Create the data table
dt = New Table( "Example",
Add Rows( 27 ),
New Script(
"Source",
Data Table( "Untitled 60" ) << Split(
Split By( :Column 2 ),
Split( :Column 1 ),
Sort by Column Property
)
),
New Column( "x axis",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[2.3856, 2.3858, 2.4184, 2.2979, 2.2979, 2.3318, 2.3856, 2.3858, 2.4184,
2.5875, 2.5878, 2.6185, 2.8174, 2.8177, 2.8398, 2.9059, 2.9062, 2.9259,
2.8174, 2.8177, 2.8398, 2.5875, 2.5878, 2.6185, 2.5875, 2.5878, 2.6185]
)
),
New Column( "y axis",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[2.2608, 2.2616, 2.2919, 2.4459, 2.4463, 2.4758, 2.6498, 2.6499, 2.6742,
2.7302, 2.7302, 2.7532, 2.6498, 2.6499, 2.6742, 2.4459, 2.4463, 2.4758,
2.2608, 2.2616, 2.2919, 2.1817, 2.1827, 2.2138, 2.4459, 2.4463, 2.4758]
)
),
New Column( "label",
Character,
"Nominal",
Set Values(
{"a", "a", "a", "b", "b", "b", "c", "c", "c", "d", "d", "d", "e", "e",
"e", "f", "f", "f", "g", "g", "g", "h", "h", "h", "i", "i", "i"}
)
),
New Column( "legend",
Character,
"Nominal",
Set Values(
{"set1", "set2", "set3", "set1", "set2", "set3", "set1", "set2", "set3",
"set1", "set2", "set3", "set1", "set2", "set3", "set1", "set2", "set3",
"set1", "set2", "set3", "set1", "set2", "set3", "set1", "set2", "set3"}
)
)
);
// Draw the scatterplot
gb = dt << Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :x axis ), Y( :y axis ), Overlay( :legend ) ),
Elements( Points( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"x axis",
ScaleBox,
{Format( "Best", 12 ), Min( 2.273568 ), Max( 3.00134902479339 ),
Inc( 0.1 ), Minor Ticks( 0 )}
)
)
);
// Add a simple graphics script to connect the points
Report( gb )[FrameBox( 1 )] << add graphics script(
Summarize( dt, byGroup = by( :legend ) );
colorList = {"Blue","Red","Green"};
fill pattern( [0] );
For( i = 1, i <= N Items( byGroup ), i++,
Pen Color(colorList[i]);
theRows = dt << get rows where( :legend == byGroup[i] & :Label != "i" );
// Add the first value as the last value to complete the object
theRows = theRows |/ theRows[1];
xMatrix = :x axis[theRows];
yMatrix = :y axis[theRows];
line( xMatrix, yMatrix );
);
);