GraphBuilder에서 여러 구성 요소가 동일한 그래프에 추가되면 일부 구성 요소가 숨겨 지거나 다른 구성 요소 뒤에 밀려서 덜 눈에 띄게됩니다.
아래 선분은 막대 선분 뒤에 있습니다.

그래프에는 오른쪽 클릭> 위쪽 / 아래쪽 화살표를 사용하여 구성 요소를 사용자 지정 및 재정렬하고 막대 세그먼트를 뒤쪽으로 보내는 옵션이 있습니다.


JMP16 (아래 전체 코드)에서이를 스크립팅하는 방법을 찾았지만 동일한 솔루션이 JMP15에서 실패합니다.
JMP15에 상응하는 솔루션이 있습니까?
gbFB1 = report(gb)[Framebox(1)];
gbFB1 << Reorder Segs({1, 2, 5});
감사
레이
재 작성할 전체 JSL 코드 :
dt_sampledata = New Table( "Exampe Data",
Add Rows( 24 ),
New Column( "Month",
Numeric,
"Ordinal",
Format( "Best", 12 ),
Set Values(
[202101, 202101, 202101, 202101, 202102, 202102, 202102, 202102, 202103,
202103, 202103, 202103, 202104, 202104, 202104, 202104, 202105, 202105,
202105, 202105, 202106, 202106, 202106, 202106]
)
),
New Column( "Product",
Character( 16 ),
"Nominal",
Set Values(
{"ProductA", "ProductB", "ProductC", "ProductD", "ProductA", "ProductB",
"ProductC", "ProductD", "ProductA", "ProductB", "ProductC", "ProductD",
"ProductA", "ProductB", "ProductC", "ProductD", "ProductA", "ProductB",
"ProductC", "ProductD", "ProductA", "ProductB", "ProductC", "ProductD"}
)
),
New Column( "Volume",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[3869, 4964, 3188, 3109, 2623, 3447, 3179, 1038, 1781, 3195, 1621, 2034,
3231, 1390, 3187, 1998, 3280, 3570, 4443, 2150, 1638, 4083, 4242, 1186]
)
),
New Column( "Chem_A",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[5, 19, 45, 36, 35, 42, 28, 46, 33, 43, 19, 5, 11, 14, 47, 21, 5, 8, 33,
32, 7, 6, 9, 33]
)
),
New Column( "Chem_B",
Numeric,
"Continuous",
Format( "Best", 12 ),
Set Values(
[64, 38, 90, 41, 69, 70, 79, 75, 79, 59, 25, 71, 64, 65, 62, 51, 88, 79,
41, 47, 22, 62, 57, 38]
)
)
);
// Graph Builder
gb = dt_sampledata << Graph Builder(
Size( 1040, 562 ),
Variables(
X( :Month ),
Y( :Volume, Side( "Right" ) ),
Y( :Chem_A, Position( 1 ) ),
Y( :Chem_B, Position( 1 ) ),
Overlay( :Product )
),
Elements(
Line( X, Y( 2 ), Y( 3 ), Overlay( 0 ), Legend( 12 ) ),
Bar( X, Y( 1 ), Legend( 11 ), Bar Style( "Stacked" ) )
),
SendToReport(
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {12, [4, 5], 11, [0, 1, 2, 3]} )}
)
)
);<BR />gbFB1 = report(gb)[Framebox(1)];<BR /><BR />gbFB1 << Reorder Segs({1, 2, 5});<BR />
그래프 빌더의 JSL 표현에서 "세그먼트"의 순서는 집단() 논의.
JMP15에서 JSL을 사용하여 요소를 재정렬하는 방법에 대한 한 가지 아이디어가 있습니다. dt_sampledata가 현재 데이터 테이블이라고 가정합니다.
// Graph Builder
gb = Graph Builder(
Size( 1040, 562 ),
Variables(
X( :Month ),
Y( :Volume, Side( "Right" ) ),
Y( :Chem_A, Position( 1 ) ),
Y( :Chem_B, Position( 1 ) ),
Overlay( :Product )
),
Elements(
Line( X, Y( 2 ), Y( 3 ), Overlay( 0 ), Legend( 12 ) ),
Bar( X, Y( 1 ), Legend( 11 ), Bar Style( "Stacked" ) )
)
);
Wait( 2 );
gbexpr = gb << get script;
// Find the position of the Elements() argument
i = 1;
While( Head( Arg( gbexpr, i ) ) != Expr( Elements ), i++ );
// Move forward the most background element to front
n = N Arg( Arg( gbexpr, i ) );
reordered_elem = Eval Expr( Elements( Expr( Arg( gbexpr, {i, n} ) ), Expr( Arg( gbexpr, {i, 1} ) ) ) );
// Replace old Elements() with the new re-ordered elements
Substitute Into( gbexpr, Arg( gbexpr, i ), Name Expr( reordered_elem ) );
// Replace the graph builder
gb << close window;
Eval( gbexpr );