嗨 - 如果對此的回答微不足道,我提前道歉,但我想創建一個具有一個連續軸和一個離散軸的圖形框(即該軸需要顯示從列表中取出的一組文本項,按照它們出現在該列表中的順序顯示)。可以這樣做嗎?如果是這樣,有人可以告訴我一個JSL需要做的例子嗎?
完美 - 使用價值標籤解決了這個問題。 我應該想到:)
非常感謝!
我不知道JMP能夠在一個文本的圖形框中有一個軸。 當我有這樣的需求時,可以使用一個處理文本軸的JMP平台,然後將所需的圖形添加到平台。 或者,您可以使用值標籤作為基於文本的軸,單元格的值為數字。
這是一個簡單的例子
Names Default To Here( 1 );
// Text list
NameList = {"KATIE", "LOUISE", "JANE", "JACLYN", "LILLIE", "TIM", "JAMES", "ROBERT", "BARBARA",
"ALICE"};
// Other axis values
AgeList = {12, 14, 13, 16, 15, 12, 12, 15, 14, 16};
// Put into a table
dt = New Table( "test data",
New Column( "Ages", values( AgeList ) ),
New Column( "Ordering", nominal, formula( Row() ) )
);
Wait( .1 ); // Make sure formula gets completed
// I do this to change the formula column to static values
dt:Ordering << delete formula;
// Change the NameList into the form required for Value Labels
For( i = 1, i <= N Items( NameList ), i++,
namelist[i] = Parse( Char( dt:ordering[i] ) || " = \!"" || namelist[i] || "\!"" )
);
// Apply the Value Labels
dt:Ordering << set property("Value Labels",eval(NameList));
// Use the platform to generate the frame box
gb = Graph Builder(
Size( 528, 464 ),
Show Control Panel( 0 ),
Variables( X( :Ordering ), Y( :Ages ) ),
Elements( Points( X, Y, Legend( 3 ) ) )
);
// Sample of adding to the results of the platform
report(gb)[Frame Box(1)] << Add Graphics Script(
Text( Center Justified, {5, 14}, "Text Added" )
);
// open a new window
nw=New Window("test", myVLB = V List Box());
// Add the platform output to the display
myVLB << append(report(gb)[frame box(1)]);