该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


Arrow() draws an arrow from the first point to the second point. The default arrowhead is scaled to 1 plus the square root of the length of the arrow. To set the length of the arrowhead, add an optional first argument, specifying the length of the arrowhead in pixels. The following example draws simple arrows.
win = New Window( "Arrowheads",
Graph Box(
Pen Size( 4 );
Arrow( 20, [10 30 90], [88 22 44] );
// matrix 1 defines an arrow from 10, 88 to
win = New Window( "Hurricane",
Graph Box(
Frame Size( 100, 100 ),
X Scale( -100, 100 ),
Y Scale( -100, 100 ),
For( r = 35, r < 100, r += 20,
ainc = 2 * Pi() * 3 / r;
For( a = 0, a < 2 * Pi(), a += ainc,
x = r * Cosine( a );
y = r * Sine( a );
x2 = rr * Cosine( aa );
y2 = rr * Sine( aa );
Arrow( {x, y}, {x2, y2} );
// list 1 defines the start point for the arrow
图 12.11 Drawing Arrows
win = New Window( "Arrowheads",
Graph Box(
Frame Size( 300, 300 ),
X Scale( 0, 100 ),
Y Scale( 0, 220 ),
For( i = 1, i < 10, i++,
Pen Color( "Red" );
Arrow( {x, y1}, {x, y2} );
Pen Color( "Blue" );
Arrow( 20, {x, y1}, {x, y2} );
Text Color( "Red" );
Text( {10, 80}, "Without Length Arg" );
Text Color( "Blue" );
Text( {10, 200}, "With Length Arg" );
图 12.12 Arrowhead Sizes
As with Line(), you can either specify the points in two-item lists as demonstrated above or as matrices of x and then y coordinates.