새 창에 그래프 추가내 데이터에는 "소스 테이블" 열 아래에 저장하는 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를 표시합니다.
보여주고 싶어
- 첫 번째 그래프: 로컬 필터 소스 테이블 = 내부.
- 두 번째 그래프 : 로컬 필터 Source Table = outter.
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: 새 창에 그래프 추가안녕. tx넬슨
빠른 답장을 보내 주셔서 감사하지만 작동하지 않습니다. 이제 새 창에 아무 것도 추가하지 않고 각 그래프에 대해 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 ) )
)}
)
)
)
);
);