嗨 JMP 社區,
目前,我正在編寫一個腳本,該腳本以預填充圖形構建器的形式創建一個繪圖模板以及其他內容。 腳本如下。 除了圖中現有的 4 個信號之外,通常希望查看其他信號的用戶應該使用開放圖形構建器。 因此,他通常會開始拖動另一列並將其放在現有 4 個信號的頂部或底部。
問題是手動放置到 y 軸上的新信號被分配了標準顏色。 我希望圖中的所有信號都具有由 :State 定義的相同顏色,無論有多少信號被拖放到 y 軸上並拖離 y 軸,而無需通過圖例屬性手動分配正確的顏色。
如何做到這一點?
謝謝
搶
Graph Builder(
Variables(
X( :Time ),
Y( :Signal 1 ),
Y( :Signal 2 ),
Y( :Signal 3 ),
Y( :Signal 4 ),
Color( :State )
),
Elements( Position( 1, 1 ), Line( X, Y, Legend( 4 ) ) ),
Elements( Position( 1, 2 ), Line( X, Y, Legend( 5 ) ) ),
Elements( Position( 1, 3 ), Line( X, Y, Legend( 6 ) ) ),
Elements( Position( 1, 4 ), Line( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch( {}, "Signal 3", ScaleBox, {Format( "Best", 12 )} ),
Dispatch( {}, "Signal 4", ScaleBox, {Format( "Best", 12 )} ),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
4,
Properties( 0, {Line Color( 21 )}, Item ID( "Here", 1 ) ),
Properties( 1, {Line Color( 20 )}, Item ID( "are", 1 ) ),
Properties( 2, {Line Color( 41 )}, Item ID( "different", 1 ) ),
Properties( 3, {Line Color( 37 )}, Item ID( "labels", 1 ) ),
Properties( 4, {Line Color( 0 )}, Item ID( "for", 1 ) ),
Properties( 5, {Line Color( 32 )}, Item ID( "certain", 1 ) ),
Properties( 6, {Line Color( 1 )}, Item ID( "system", 1 ) ),
Properties( 7, {Line Color( 32 )}, Item ID( "states", 1 ) )
)}
)
)
)