新しいウィンドウにグラフを追加私のデータには 2 つの入力データ グループがあり、それを「ソース テーブル」列に保存します。
次に、for ループを作成してグラフをプロットし、ソース テーブルからローカル フィルターを設定します。個々のプロットは正しいことがわかりますが、プロットを追加しようとしている新しいウィンドウでは、プロットにローカル フィルターが適用されていません。
New Window( "Plot", tb = tab Box() );
For( i = 1, i <= N Items( list ), i++,
obj = Graph Builder(
Size( 1122, 1095 ),
Variables( X( :sequence ), Y( :Data ), Group X( :Source Table), Group X(:SERIAL_NO ), Group Y( :Group ), Overlay( :Label ) ),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list [i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
);
tb << append( "Tab",Report( obj ) );
//obj << delete;
);Re: 新しいウィンドウにグラフを追加する次に、サブグループごとに異なる「タブ」を作成して、別のレイヤーを追加しようとします。
内側の各サブグループは同じプロットになります (ソーステーブルによる)
以下はスクリプトです。 新しいタブを作成しましたが、すべてのプロットがタブ「???」内にあります。
Summarize( unique_value = by( :SubGroup) );
list1 = unique_value;
Summarize( unique_value = by( :Source Table ) );
list2 = unique_value;
New Window( "Plot", Tab Box( "The Results", tb = Tab Box(), vlb = V List Box() ) );
For( j = 1, j <= N Items( list1 ), j++,
tb << Add(
"Group" || list1[j],
For( i = 1, i <= N Items( list2 ), i++,
tb << append(
vlb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table, :SubGroup ),
Where( :Source Table == list2[i] ),
Where( :SubGroup == list1[j] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
)
)
)
)
);
Re: 新しいウィンドウにグラフを追加するありがとう。Re: 新しいウィンドウにグラフを追加するスクリプトを少し変更しましたが、エラーなしで実行されているようです。ローカル フィルターはさまざまな選択を行っています。これが私のスクリプトです
Names Default To Here( 1 );
dt = Current Data Table();
Summarize( unique_value = by( :Source Table ) );
list = unique_value;
New Window( "Plot", Tab Box( "The Results", tb = H List Box() ) );
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
)
);
Re: 新しいウィンドウにグラフを追加するこんにちは、
はっきりさせなくてごめんなさい。 「ソーステーブル」列に基づいて 2 つのプロットを作成してみます。 生データには 2 つのカテゴリ (内側と外側) があります。
スクリプトを試しましたが、リストをソーステーブルタイプに戻しました。
新しいウィンドウにグラフが表示されますが、両方のグラフにローカル フィルター Source Table = inner が表示されます。
見せたい
- 最初のグラフ: ローカル フィルター ソース テーブル = 内部。
- 2 番目のグラフ: ローカル フィルター ソース テーブル = 外部。
Names Default To Here( 1 );
dt = Current Data Table();
Summarize( unique_value = by( :Source Table ) );
list = unique_value;
New Window( "Plot",
tb = Tab Box(),
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
);
);
);
Re: 新しいウィンドウにグラフを追加する「list」という名前のリストを追加し、終了「)」を New Window ステートメントからコードの最後に移動する必要がありました。そして、サンプルデータで動作するようになりました
names default to here(1);
dt=current data table();
list={"data"};
New Window( "Plot", tb = Tab Box() ,
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
);
);
);Re: 新しいウィンドウにグラフを追加するこれがサンプルです。 ありがとう。
Re: 新しいウィンドウにグラフを追加するサンプルデータを添付していただければ検討させていただきます。 私が使用した方法はテスト済みの方法なので、何か小さな問題が発生しているのではないかと思います。Re: 新しいウィンドウにグラフを追加するこんにちは。テキネルソン
素早い返信ありがとうございますが、うまくいきません。 新しいウィンドウには何も追加されず、グラフごとに 2 つのプロットが得られました。Re: 新しいウィンドウにグラフを追加するこれを試してみてください....これをテストするためのデータはありませんが、実際のプラットフォームを含めるように追加を移動すると、ローカル データ フィルターが提供されるはずです。
New Window( "Plot", tb = Tab Box() );
For( i = 1, i <= N Items( list ), i++,
tb << append(
obj = Graph Builder(
Size( 1122, 1095 ),
Variables(
X( :sequence ),
Y( :Data ),
Group X( :Source Table ),
Group X( :SERIAL_NO ),
Group Y( :Group ),
Overlay( :Label )
),
Elements( Line( X, Y, Legend( 10 ) ) ),
Local Data Filter(
Add Filter(
columns( :Source Table ),
Where( :Source Table == list[i] ),
Display( :Source Table, Size( 181, 34 ), List Display )
)
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
10,
Properties( 0, {Line Style( "DashDot" )}, Item ID( "CTAP1", 1 ) ),
Properties( 1, {Line Style( "DashDot" )}, Item ID( "CTAP2", 1 ) ),
Properties( 2, {Line Color( 0 ), Line Style( "DashDot" )}, Item ID( "CTAP3", 1 ) ),
Properties( 3, {Line Color( 9 ), Line Style( "DashDot" )}, Item ID( "CTAP4", 1 ) ),
Properties( 4, {Line Style( "Dotted" )}, Item ID( "Inline_X", 1 ) ),
Properties( 5, {Line Style( "Dotted" )}, Item ID( "Inline_Y", 1 ) ),
Properties( 8, {Line Color( 5 )}, Item ID( "MZ1_L", 1 ) ),
Properties( 9, {Line Color( 5 ), Line Style( "Dashed" )}, Item ID( "MZ1_R", 1 ) ),
Properties( 10, {Line Color( 3 )}, Item ID( "MZ2_L", 1 ) ),
Properties( 11, {Line Color( 3 ), Line Style( "Dashed" )}, Item ID( "MZ2_R", 1 ) ),
Properties( 12, {Line Color( 0 )}, Item ID( "MZ3_L", 1 ) ),
Properties( 13, {Line Color( 0 ), Line Style( "Dashed" )}, Item ID( "MZ3_R", 1 ) ),
Properties( 14, {Line Color( 9 )}, Item ID( "MZ4_L", 1 ) ),
Properties( 15, {Line Color( 9 ), Line Style( "Dashed" )}, Item ID( "MZ4_R", 1 ) )
)}
)
)
)
);
);