大家好,
所以我有一個按“BY”分組劃分的可變性圖表,我在https://community.jmp.com/t5/Discussions/How-to-add-Dynamic-horizontal-line-by-shared-y-axis-among/mp/622722我在其中了解圖形腳本如何根據數據表中的值添加相應的行。 我試圖使這種方法適應具有更多框架框的可變性圖表,但我無法弄清楚如何去做。 我現在的猜測是將每個 By 放在一個 for 循環中,然後將圖形迭代地添加到相應的框架框,但我對如何做到這一點感到困惑,因為我不確定如何迭代地訪問框架框。 任何幫助,將不勝感激。 謝謝!
請使用下面的 rpt 並可能添加一個 for 循環,以便
//Potential for loop?<BR /><BR />rpt = dt << Variability Chart(
Y( :Head IC),
X( :Make, :Model ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Show Range Bars( 0 ),
Show Cell Means( 0 ),
Std Dev Chart( 0 ),
Points Jittered( 1 ),
BY(:Name("D/P"))
);
<BR />//Subset data table by "By" condition to add the correct lines based on the condition.<BR />
tree = rpt << Report;
Eval( Eval Expr(
tree[FrameBox( 1 )] << Add Graphics Script(
Local( {values = Expr( category average ), numbers = Expr( category number ), i, items, sum = 0},
items = numbers << Get Keys;
Pen Size( 2 );
Pen Color( "Blue" );
Summation( i = 1, N Items( items ),
Line( Eval List( {sum, values[items[i]]} ), Eval List( {sum += numbers[items[i]], values[items[i]]} ) );
0
)
)
)
)
)