嗨 - 如果对此的回答微不足道,我提前道歉,但我想创建一个具有一个连续轴和一个离散轴的图形框(即该轴需要显示从列表中取出的一组文本项,按照它们出现在该列表中的顺序显示)。可以这样做吗?如果是这样,有人可以告诉我一个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)]);