使用圖形生成器時,它允許您“突出顯示”或“選擇”圖例中的特定數據子集。 圖形生成器和數據表上的相應輸出也會突出顯示。 當選擇數據子集時,其他子集會淡入背景或以交互方式增加其透明度。
我可以添加與所選數據集相對應的參考線以相同的方式交互運行嗎? 我是否可以讓這些線條自動為自己著色,就像我將標稱列放入圖例字段時那樣?
通過索引列表
["addrefline"]
- 好技巧:)
為什麼它有效?
它找到第一個符號(獨立於大寫/小寫和空格) - 並返回第一個參數?
這是一些入門 JSL。
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
oldselection = [];// don't update when nothing changes by comparing old to new
f = Function( {a}, // this callback tells which points are changing selected state
// and may send between 1 and N row numbers in the matrix a.
// this example will ignore a and just ask the table about the range of the currently
// selected points.
{subset, hmin, hmax, wmin, wmax, newselection}, // local variables
newselection = dt << getselectedrows; // compare to previous selection...
If( Try( N Rows( newselection ) != N Rows( oldselection ) | Any( newselection != oldselection ), 1 ),
oldselection = newselection; // remember the new selection for next time
dtSubset = dt << subset( SelctedRows( 1 ), LinkToOriginalDataTable( 1 ), invisible ); // make a subset of the selection to summarize
dtSummary = dtSubset << Summary( Min( :height ), Min( :weight ), Max( :height ), Max( :weight ), Freq( "None" ), Weight( "None" ) );
Close( dtSubset, "nosave" ); // done with the subset, use the summary...
hmin = dtSummary:name( "Min(Height)" )[1]; // capture the range of the selected axis
hmax = dtSummary:name( "Max(Height)" )[1];
wmin = dtSummary:name( "Min(Weight)" )[1];
wmax = dtSummary:name( "Max(Weight)" )[1];
Close( dtSummary, "nosave" ); // done with the summary, use the captured values...
// remove 2 old reflines first, from each axis, then add 2 new ones
// remove the old ref lines from the weight axis (1==horizontal)
Report( gb )[axisbox( 1 )] << removerefline( (Report( gb )[axisbox( 1 )] << getscript)["addrefline"] );
Report( gb )[axisbox( 1 )] << removerefline( (Report( gb )[axisbox( 1 )] << getscript)["addrefline"] );
// remove the old ref lines from the height axis (2==vertical)
Report( gb )[axisbox( 2 )] << removerefline( (Report( gb )[axisbox( 2 )] << getscript)["addrefline"] );
Report( gb )[axisbox( 2 )] << removerefline( (Report( gb )[axisbox( 2 )] << getscript)["addrefline"] );
// add the new ref lines...extend the bounding box by .5 for the integer height/weight (not required)
Report( gb )[axisbox( 1 )] << addrefline( wmin - .5, "solid", "red", "a", 2 );
Report( gb )[axisbox( 1 )] << addrefline( wmax + .5, "solid", "green", "b", 2 );
Report( gb )[axisbox( 2 )] << addrefline( hmin - .5, "solid", "blue", "c", 1 );
Report( gb )[axisbox( 2 )] << addrefline( hmax + .5, "solid", "black", "d", 1 );
);
);
rs = dt << make row state handler( f );
gb = Graph Builder(
Size( 416, 300 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ) ),
SendToReport( Dispatch( {}, "Graph Builder", OutlineBox, {Set Title( "" )} ), Dispatch( {}, "graph title", TextEditBox, {Set Text( "Demo" )} ) )
);
JSL 在數據表中安裝 RowState 處理函數;當表的行狀態數據更改時(當選擇/隱藏/排除行,或者標記樣式或顏色更改時),該函數會收到通知。該函數計算所選列的最小值和最大值,並刪除舊的參考線並添加新的參考線。
The a-b-c-d ref lines are interactively tracking the rectangular point selectionThe a-b-c-d ref lines are interactively tracking the rectangular point selectionThe a-b-c-d ref lines are interactively tracking the rectangular point selectionThe a-b-c-d ref lines are interactively tracking the rectangular point selectionThe a-b-c-d ref lines are interactively tracking the rectangular point selectionThe a-b-c-d ref lines are interactively tracking the rectangular point selectionThe a-b-c-d ref lines are interactively tracking the rectangular point selectionThe a-b-c-d ref lines are interactively tracking the rectangular point selectionabcd 參考線交互式地跟踪矩形點選擇
它會在更新時閃爍,因為添加或刪除每個參考線時都會重新繪製顯示;對於大量數據,重繪圖表需要很長時間,它可能會變得太慢。
是的。 沒有詳細記錄,但對於模式對話框 <模態對話框從頂部向下 2/5。
axisbox<
抱歉,JSL 值得更好的評論!