MarkerSeg
Associated Constructors
Marker Seg
Syntax: me = Marker Seg( x, y, < Row States( dt | dt,[rows] | dt,{{rows}, ...} | {states} ) >, < Sizes( s ) > )
Description: Returns a display seg with markers for all of the X and Y values.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
Item Messages
Always Show Label
Syntax: obj << Always Show Label( {pt, state=0|1}, ... )
Description: Always show the marker label even if it being hidden by an overlapping label
Open( "$SAMPLE_DATA/Big Class.jmp" );
For( i = 1, i <= 40, i++,
Labeled( Row State( i ) ) = 1
);
r = Bivariate( Y( :weight ), X( :height ) ) << Report();
frame = r[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << always show label( {0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}, {5, 1} );
Child
Syntax: seg2 = obj << Child
Description: Returns the first child of the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Child; // not many segs support children
Class Name
Syntax: classname = obj << Class Name
Description: Returns the name of the display class for the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Class Name;
Clip Shape
Syntax: seg << Clip Shape(Boundaries(Shape File, [ID(string)]) | Path([string] | [matrix]) | Empty())
Description: Clips the geometry by the given shape. The shape can be specified using a shape file or a path. An optional ID can be specified with a shape file to select a single shape from the file, otherwise the union of all shapes is used as the clipping region. A clipping path can be specified with an N x 3 matrix or with a text representation. A path matrix has three columns for x, y, and flags for each point in the path. The flag values are 0 for control, 1 for move, 2 for line segment, 3 for cubic Bézier segment, and are negative if the point also closes the path. Path text supports SVG syntax.
JMP Version Added: 14
Open( "$SAMPLE_DATA/Cities.jmp" );
gb = Graph Builder(
Size( 653, 396 ),
Show Control Panel( 0 ),
Variables( X( :Longitude ), Y( :Latitude ) ),
Elements( Contour( X, Y, Legend( 2 ) ) ),
SendToReport(
Dispatch( {}, "Graph Builder", FrameBox,
{Background Map( Boundaries( "US States" ) ), Grid Line Order( 2 ),
Reference Line Order( 3 )}
)
)
);
cs = (gb << Report)[FrameBox( 1 )] << Find Seg( Contour Seg( 1 ) );
Wait( 2 );
cs << Clip Shape( Boundaries( "US States" ) );
Color
Syntax: obj << Color( color )
Description: Sets the color for all markers.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Color( "Green" );
Color Theme
Syntax: obj << Color Theme
Delete
Syntax: obj << Delete
Description: Delete the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Delete;
Density Gradient
Syntax: obj << Density Gradient( "Fade to White"|"Fade To Gray"|"Full Color"="Fade to White" )
Description: Sets the coloring behavior of density gradients. "Fade to White" by default.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Density Gradient( "Fade to Gray" );
Frame
Syntax: FrameBox = obj << Frame
Description: Returns the frame box that the display seg is in.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Frame;
Get Clip Shape
Syntax: obj << Get Clip Shape
Description: Returns the current clipping shape
JMP Version Added: 14
Open( "$SAMPLE_DATA/Cities.jmp" );
gb = Graph Builder(
Size( 653, 396 ),
Show Control Panel( 0 ),
Variables( X( :Longitude ), Y( :Latitude ) ),
Elements( Contour( X, Y, Legend( 2 ) ) ),
SendToReport(
Dispatch( {}, "Graph Builder", FrameBox,
{Background Map( Boundaries( "US States" ) ), Grid Line Order( 2 ),
Reference Line Order( 3 )}
)
)
);
cs = (gb << Report)[FrameBox( 1 )] << Find Seg( Contour Seg( 1 ) );
cs << Clip Shape( Boundaries( "US States" ) );
Wait( 2 );
cs << Get Clip Shape();
Get Color
Syntax: color = obj << Get Color
Description: Returns the marker color.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Color;
Get Colors
Syntax: list = obj << Get Colors
Description: Returns a list of marker colors based on the row states for the markers.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Colors;
Get Density Gradient
Syntax: obj << Get Density Gradient
Description: Gets the coloring behavior of density gradients.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Density Gradient;
Get Description
Syntax: description = obj << Get Description
Description: Gets the description for the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << get description();
Get Force Labels
Syntax: obj << Get Force Labels( "No Labels"|"Label by Value"|"Label by Row"|"Label by Row and Value" )
Description: Label every marker regardless of the data table row state flags.
JMP Version Added: 18
Get Gradient
Syntax: obj << Get Gradient
Description: Gets the coloring gradient.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient;
Get Gradient Color Theme
Syntax: obj << Get Gradient Color Theme
Description: Gets the gradient's color theme.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Color Theme;
Get Gradient Discrete Colors
Syntax: obj << Get Gradient Discrete Colors
Description: Gets if each level in a gradient should be a single color or if colors should transition smoothly.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Discrete Colors;
Get Gradient Fill
Syntax: obj << Get Gradient Fill
Description: Gets the coloring behavior for values outside of the range of the gradient's scale.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Get Gradient Fill;
Get Gradient Label Count
Syntax: obj << Get Gradient Label Count
Description: Gets the number of labels in a gradient's legend.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Label Count;
Get Gradient Label Levels
Syntax: [value1,value1, ... value N] = obj << Get Gradient Label Levels
Description: Gets the set of values used for labels in the gradient's scale.
JMP Version Added: 18
Example 1
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Get Gradient Scale Values;
Example 2
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale Values( [-10.0, 0.0, 100] );
seg << Get Gradient Scale Values;
Get Gradient Legend Horizontal
Syntax: obj << Get Gradient Legend Horizontal
Description: Gets if the gradient's legend should be drawn horizontally.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Legend Horizontal;
Get Gradient Legend Label Format
Syntax: obj << Get Gradient Legend Label Format
Description: Gets the format for gradient legend labels
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Legend Label Format;
Get Gradient Legend Label Width
Syntax: obj << Get Gradient Legend Label Width
Description: Gets the maximum character length of gradient legend labels.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Legend Label Width;
Get Gradient Legend Show Labels
Syntax: obj << Get Gradient Legend Show Labels
Description: Gets if the level labels should be shown in the gradient's legend.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Legend Show Labels;
Get Gradient Level Count
Syntax: obj << Get Gradient Level Count
Description: Gets the number of levels in a gradient.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Levels;
Get Gradient Lightness Range
Syntax: obj << Get Gradient Lightness Range
Description: Gets the minimum and maximum lightness for level colors in a gradient. Missing values indicate that the color theme's original value is used.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Lightness Range;
Get Gradient Range
Syntax: obj << Get Gradient Range
Description: Gets the range over which non-custom gradient scales are generated.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Get Gradient Range;
Get Gradient Reverse Color Order
Syntax: obj << Get Gradient Reverse Color Order
Description: Gets if the order of colors in a gradient is reversed.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Reverse Color Order;
Get Gradient Reverse Label Order
Syntax: obj << Get Gradient Reverse Label Order
Description: Gets if the order of labels in a gradient is reversed.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Reverse Label Order;
Get Gradient Scale
Syntax: obj << Get Gradient Scale
Description: Gets the gradient scale type.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Get Gradient Scale;
Get Gradient Scale Values
Syntax: [value1,value1, ... value N] = obj << Get Gradient Scale Values
Description: Gets the set of values used for labels in the gradient's scale.
JMP Version Added: 18
Example 1
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Get Gradient Scale Values;
Example 2
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale Values( [-10.0, 0.0, 100] );
seg << Get Gradient Scale Values;
Get Gradient Show Missing
Syntax: obj << Get Gradient Show Missing
Description: Gets when to show the legend entry for missing values.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Show Missing;
Get Gradient Transparency
Syntax: obj << Get Gradient Transparency
Description: Gets the transparency behavior of gradients.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Gradient Transparency;
Get Hide Missing Color
Syntax: true/false = obj << Get Hide Missing Color
Random Reset( 1111111 );
n = 1000;
T1 = J( n, 1, Random Normal() );
T1[Loc( J( n, 1, Random Integer( 0, 1 ) ) )] = .;
dt = New Table( "Test",
New Column( "X", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "Y", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "T1", Values( T1 ) ),
);
obj = dt << Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Color( :T1 ) ),
Elements( Points( X, Y, Legend( 16 ) ) )
);
frame = Report( obj )[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Hide Missing Color;
Get Hide Missing Size
Syntax: true/false = obj << Get Hide Missing Size
Random Reset( 1111111 );
n = 1000;
T1 = J( n, 1, Random Normal() );
T1[Loc( J( n, 1, Random Integer( 0, 1 ) ) )] = .;
dt = New Table( "Test",
New Column( "X", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "Y", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "T1", Values( T1 ) ),
);
obj = dt << Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Size( :T1 ) ),
Elements( Points( X, Y, Legend( 16 ) ) )
);
frame = Report( obj )[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Hide Missing Size;
Get Jitter
Syntax: {method, axis, limit, spacing, seed, side, overlap, grid offset, smoothing, max error, bandwidth} = obj << Get Jitter
Description: Returns settings used to offset marker positions for collision reduction. method is none|random uniform|random normal|centered|centered grid|positive grid. axis is X|Y|XY. limit is the width of the jitter, adjusted for the method. spacing is the percentage of the marker size using for jittering or 0 for auto-adjustment.
JMP Version Added: 14
Open( "$SAMPLE_DATA/Big Class.jmp" );
r = Oneway( Y( :height ), X( :sex ), Means( 1 ), MeanDiamonds( 1 ), XAxisProportional( 0 ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
{method, axis, limit, spacing, seed, side, overlap, grid offset, smoothing, max error,
bandwidth} = seg << Get Jitter();
Get Jitter Offsets
Syntax: matrix = obj << Get Jitter Offsets
Description: Returns an N by 2 matrix of X and Y jitter offsets.
x = J( 1, 100, Random Normal() );
y = J( 1, 100, 0 );
New Window( "Marker Seg Example",
g = Graph Box(
X Scale( -4, 4 ),
Y Scale( -0.5, 0.5 ),
Frame Size( 300, 200 ),
Marker Seg( x, y, <<Set Marker Size( 5 ), <<Set Jitter( {"Grid", "Y"} ) )
)
);
seg = (g[FrameBox( 1 )] << Find Seg( Marker Seg( 1 ) ));
jitter = seg << Get Jitter Offsets;
avg = Mean( jitter[0, 1] );
Get Label Value Axis
Syntax: obj << Get Label Value Axis( "X"|"Y" )
Description: Whether forced labels show the X or Y value.
JMP Version Added: 18
Get Label Value Format
Syntax: obj << Get Label Value Format
Description: How to format the X or Y value; Auto means use axis format.
JMP Version Added: 18
Get Marker
Syntax: marker = obj << Get Marker
Description: Returns the marker style.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Marker;
Get Marker Draw Column
Syntax: column = obj << Get Marker Draw Column
Description: Returns any custom marker drawing data table column.
JMP Version Added: 16
Open( "$SAMPLE_DATA/Big Class Families.jmp" );
r = Bivariate( Y( :height ), X( :weight ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
seg << Set Marker Draw Column( :picture );
ex = seg << Get Marker Draw Column();
Get Marker Draw Expr
Syntax: expr = obj << Get Marker Draw Expr
Description: Returns the custom marker drawing expression.
JMP Version Added: 16
Open( "$SAMPLE_DATA/Big Class.jmp" );
r = Bivariate( Y( :height ), X( :weight ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
seg << Set Marker Draw Expr( [-1 0, 0 2, 1 0, 0 1, -1 0] );
ex = seg << Get Marker Draw Expr();
Get Marker Size
Syntax: size = obj << Get Marker Size
Description: Returns the marker size.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Marker Size;
Get Markers
Syntax: list = obj << Get Markers
Description: Returns a list of markers based on the row states.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Markers;
Get Overlay Color
Syntax: color = obj << Get Overlay Color( marker index )
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
op = dt << Overlay Plot( X( :age ), Y( :height, :weight ) );
rep = op << report;
frame = rep[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Overlay Color( 1 );
Get Overlay Count
Syntax: number = obj << Get Overlay Count
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
op = dt << Overlay Plot( X( :age ), Y( :height, :weight ) );
rep = op << report;
frame = rep[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Overlay Count;
Get Overlay Marker
Syntax: marker = obj << Get Overlay Marker( marker index )
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
op = dt << Overlay Plot( X( :age ), Y( :height, :weight ) );
rep = op << report;
frame = rep[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Overlay Marker( 1 );
Get Point
Syntax: point = obj << Get Point( index )
Description: Returns the X and Y coordinates of the specified point.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Point( 2 );
Get Point Count
Syntax: Number = obj << Get Point Count
Description: Returns the number of points in the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Point Count;
Get Row Numbers
Syntax: matrix = obj << Get Row Numbers
Description: Returns a vector of marker row numbers.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
x = [10 50 70];
y = [60 50 10];
New Window( "Marker Seg Example",
g = Graph Box( Marker Seg( x, y, Row States( dt, [5 7 9] ) ) )
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Row Numbers;
Get Sizes
Syntax: matrix = obj << Get Sizes
Description: Returns a vector of marker sizes.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Sizes;
Get Transparency
Syntax: obj << Get Transparency
Description: Returns a numeric value representing transparency between 0 and 1.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Transparency;
Get Value Label Width
Syntax: obj << Get Value Label Width( number )
Description: Maximum width for a formatted label value.
JMP Version Added: 18
Get X Values
Syntax: matrix = obj << Get X Values
Description: Returns a list of X values.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get X Values;
Get Y Values
Syntax: matrix = obj << Get Y Values
Description: Returns a list of Y values.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Get Y Values;
Gradient
Syntax: obj << { <Color Theme(theme)>, <Min Lightness(0-1)>, <Max Lightness(0-1)>, <Contour Levels(num)>, <Reverse Gradient(0|1)>, <Density Gradient("Fade To White"|"Fade To Gray"|"Full Color")>, <Gradient Transparency("None"|"Linear")> }obj << { <Color Theme(theme)>, <Min Lightness(0-1)>, <Max Lightness(0-1)>, <N Labels(num)>, <Show Missing Color("On"|"Off"|"Auto")>, <Scale Type("Linear"|"Quantile"|"Standard Deviation"|"Log"|"Log Offset"|"Custom")>, <Scale Values([v1, v2, …])>, <Range Type("Default"|"Exact Data Range"|"Middle 90%")>, <Fill("Between"|"Above"|"Below"|"Above Below")>, <Reverse Gradient(0|1)>, <Reverse Labels(0|1)>, <Discrete Color(0|1)> }, <Label Format(labelFormat)>, <Width(num)>, <Horizontal(0|1)>, <Show Labels(0|1)>
Description: Sets the coloring gradient.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient( {Color Theme( "Viridis" ), N Labels( 7 )} );
Gradient Color Theme
Syntax: obj << Gradient Color Theme
Description: Sets the gradient's color theme.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Color Theme( "Viridis" );
Gradient Discrete Colors
Syntax: obj << Gradient Discrete Colors
Description: Sets if each level in a gradient should be a single color or if colors should transition smoothly.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Points( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Marker Seg( 1 ) );
seg << Set Gradient Discrete Colors( 1 );
Gradient Fill
Syntax: obj << Gradient Fill( "Between"|"Above"|"Below"|"Above Below"="Above Below" )
Description: Sets the coloring behavior for values outside of the range of the gradient's scale. "Above Below" by default.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Range( "Middle 90%" );
seg << Set Gradient Fill( "Between" );
Gradient Label Count
Syntax: obj << Gradient Label Count
Description: Sets the number of labels in a gradient's legend. This is one more than the number of contour levels.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Label Count( 8 );
Gradient Label Levels
Syntax: obj << Gradient Label Levels( [value1,value1, ... value N] )
Description: Sets a custom set of values for use in the gradient's scale.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale Values( [-10.0, 0.0, 10.0] );
Gradient Legend Horizontal
Syntax: obj << Gradient Legend Horizontal
Description: Sets if the gradient's legend should be drawn horizontally.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Horizontal( 1 );
Gradient Legend Label Format
Syntax: obj << Gradient Legend Label Format
Description: Sets the format for gradient legend labels
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Label Format( "Fixed Dec", 6, 3 );
Gradient Legend Label Width
Syntax: obj << Gradient Legend Label Width
Description: Sets the maximum character length of gradient legend labels.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Label Width( 4 );
Gradient Legend Show Labels
Syntax: obj << Gradient Legend Show Labels
Description: Sets if the level labels should be shown in the gradient's legend.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Show Labels( 0 );
Gradient Level Count
Syntax: obj << Gradient Level Count
Description: Sets the number of levels in a gradient. This is one less than the number of labels.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Levels( 7 );
Gradient Lightness Range
Syntax: obj << Gradient Lightness Range
Description: Sets the minimum and maximum lightness for level colors in a gradient. The colors will be scaled to cover this range. A missing value is treated as no change.
JMP Version Added: 18
Example 1
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Lightness Range( Min( 0.25 ), Max( 0.75 ) );
Example 2
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Lightness Range( 0.25, 0.75 );
Example 3
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Lightness Range( ., 0.75 );
Gradient Range
Syntax: obj << Gradient Range( "Default"|"Exact Data Range"|"Middle 90%"="Default" )
Description: Sets the range over which non-custom gradient scales are generated. "Default" by default.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Range( "Exact Data Range" );
Gradient Reverse Color Order
Syntax: obj << Gradient Reverse Color Order
Description: Reverses the order of the colors in a gradient.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Reverse Color Order( 1 );
Gradient Reverse Label Order
Syntax: obj << Gradient Reverse Label Order
Description: Reverses the order of the labels in a gradient.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Reverse Label Order( 1 );
Gradient Scale
Syntax: obj << Gradient Scale( "Linear"|"Quantile"|"Standard Deviation"|"Log"|"Log Offset"|"Custom"="Linear" )
Description: Sets the gradient scale type. "Linear" by default.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale( "Quantile" );
Gradient Scale Values
Syntax: obj << Gradient Scale Values( [value1,value1, ... value N] )
Description: Sets a custom set of values for use in the gradient's scale.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale Values( [-10.0, 0.0, 10.0] );
Gradient Show Missing
Syntax: obj << Gradient Show Missing( "Auto"|"On"|"Off"="Auto" )
Description: Sets when to show the legend entry for missing values. "Auto" by default.
JMP Version Added: 18
dt = Open( "$Sample_Data/Cities.jmp" );
gb = Graph Builder(
Variables( X( :city ), Y( :POP ), Color( :NO ) ),
Elements( Bar( X, Y ) )
);
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Bar Seg( 1 ) );
seg << Set Gradient Show Missing( "Off" );
Gradient Transparency
Syntax: obj << Gradient Transparency( "None"|"Linear"="Linear" )
Description: Sets the transparency behavior of gradients. "Linear" by default.
JMP Version Added: 15
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Gradient Transparency( "None" );
Label Offset
Syntax: obj << Label Offset( {pt, x offset, y offset}, ... )
Description: Positions row labels according to the given coordinates.
Open( "$SAMPLE_DATA/Big Class.jmp" );
Labeled( Row State( 5 ) ) = 1;
Labeled( Row State( 8 ) ) = 1;
dist = Distribution( Continuous Distribution( Column( :height ) ) );
frame = (dist << report)[FrameBox( 2 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << label offset( {0, -20, -10}, {1, -20, -30} );
Marker
Syntax: obj << Marker( marker )
Description: Sets the marker style for all markers.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Marker( "Square" );
Marker Size
Syntax: obj << Marker Size
Description: Sets the size for the markers. Size options are Dot, Small, Medium, Large, XL, XXL, and XXXL.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Marker Size( "XL" );
Wait( 1 );
seg << Set Marker Size( "dot" );
Parent
Syntax: seg2 = obj << Parent
Description: Returns the parent of the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Parent;
Revert
Syntax: obj << Revert
Description: Changes the seg back to its original state.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
Wait( 1 );
seg << Set Color( "Red" );
Wait( 1 );
seg << Revert;
Set Color
Syntax: obj << Set Color( color )
Description: Sets the color for all markers.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Color( "Green" );
Set Description
Syntax: obj << Set Description( description )
Description: Sets the description for the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << set description( "my seg" );
Set Force Labels
Syntax: obj << Set Force Labels( "No Labels"|"Label by Value"|"Label by Row"|"Label by Row and Value" )
Description: Label every marker regardless of the data table row state flags.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Big Class.jmp" );
Bivariate(
Y( :weight ),
X( :height ),
SendToReport(
Dispatch( {}, "Bivar Plot", FrameBox,
{DispatchSeg(
Marker Seg( 1 ),
Set Force Labels( "Label by Value" ),
Set Label Value Axis( "X" ),
Set Label Value Format( "Fixed", 1 )
)}
)
)
);
Set Gradient
Syntax: obj << { <Color Theme(theme)>, <Min Lightness(0-1)>, <Max Lightness(0-1)>, <Contour Levels(num)>, <Reverse Gradient(0|1)>, <Density Gradient("Fade To White"|"Fade To Gray"|"Full Color")>, <Gradient Transparency("None"|"Linear")> }obj << { <Color Theme(theme)>, <Min Lightness(0-1)>, <Max Lightness(0-1)>, <N Labels(num)>, <Show Missing Color("On"|"Off"|"Auto")>, <Scale Type("Linear"|"Quantile"|"Standard Deviation"|"Log"|"Log Offset"|"Custom")>, <Scale Values([v1, v2, …])>, <Range Type("Default"|"Exact Data Range"|"Middle 90%")>, <Fill("Between"|"Above"|"Below"|"Above Below")>, <Reverse Gradient(0|1)>, <Reverse Labels(0|1)>, <Discrete Color(0|1)> }, <Label Format(labelFormat)>, <Width(num)>, <Horizontal(0|1)>, <Show Labels(0|1)>
Description: Sets the coloring gradient.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient( {Color Theme( "Viridis" ), N Labels( 7 )} );
Set Gradient Color Theme
Syntax: obj << Set Gradient Color Theme
Description: Sets the gradient's color theme.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Color Theme( "Viridis" );
Set Gradient Custom Scale
Syntax: obj << Set Gradient Custom Scale
Description: Sets the gradient to use a list of values for a custom scale.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Custom Scale( {0.0, 5.0, 10.0, 20.0} );
Set Gradient Discrete Colors
Syntax: obj << Set Gradient Discrete Colors
Description: Sets if each level in a gradient should be a single color or if colors should transition smoothly.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Points( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Marker Seg( 1 ) );
seg << Set Gradient Discrete Colors( 1 );
Set Gradient Fill
Syntax: obj << Set Gradient Fill( "Between"|"Above"|"Below"|"Above Below"="Above Below" )
Description: Sets the coloring behavior for values outside of the range of the gradient's scale. "Above Below" by default.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Range( "Middle 90%" );
seg << Set Gradient Fill( "Between" );
Set Gradient Label Count
Syntax: obj << Set Gradient Label Count
Description: Sets the number of labels in a gradient's legend. This is one more than the number of contour levels.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Label Count( 8 );
Set Gradient Label Levels
Syntax: obj << Set Gradient Label Levels( [value1,value1, ... value N] )
Description: Sets a custom set of values for use in the gradient's scale.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale Values( [-10.0, 0.0, 10.0] );
Set Gradient Legend Horizontal
Syntax: obj << Set Gradient Legend Horizontal
Description: Sets if the gradient's legend should be drawn horizontally.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Horizontal( 1 );
Set Gradient Legend Label Format
Syntax: obj << Set Gradient Legend Label Format
Description: Sets the format for gradient legend labels
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Label Format( "Fixed Dec", 6, 3 );
Set Gradient Legend Label Width
Syntax: obj << Set Gradient Legend Label Width
Description: Sets the maximum character length of gradient legend labels.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Label Width( 4 );
Set Gradient Legend Show Labels
Syntax: obj << Set Gradient Legend Show Labels
Description: Sets if the level labels should be shown in the gradient's legend.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Legend Show Labels( 0 );
Set Gradient Level Count
Syntax: obj << Set Gradient Level Count
Description: Sets the number of levels in a gradient. This is one less than the number of labels.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Levels( 7 );
Set Gradient Lightness Range
Syntax: obj << Set Gradient Lightness Range
Description: Sets the minimum and maximum lightness for level colors in a gradient. The colors will be scaled to cover this range. A missing value is treated as no change.
JMP Version Added: 18
Example 1
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Lightness Range( Min( 0.25 ), Max( 0.75 ) );
Example 2
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Lightness Range( 0.25, 0.75 );
Example 3
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Lightness Range( ., 0.75 );
Set Gradient Range
Syntax: obj << Set Gradient Range( "Default"|"Exact Data Range"|"Middle 90%"="Default" )
Description: Sets the range over which non-custom gradient scales are generated. "Default" by default.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Range( "Exact Data Range" );
Set Gradient Reverse Color Order
Syntax: obj << Set Gradient Reverse Color Order
Description: Reverses the order of the colors in a gradient.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Reverse Color Order( 1 );
Set Gradient Reverse Label Order
Syntax: obj << Set Gradient Reverse Label Order
Description: Reverses the order of the labels in a gradient.
JMP Version Added: 18
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Gradient Reverse Label Order( 1 );
Set Gradient Scale
Syntax: obj << Set Gradient Scale( "Linear"|"Quantile"|"Standard Deviation"|"Log"|"Log Offset"|"Custom"="Linear" )
Description: Sets the gradient scale type. "Linear" by default.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale( "Quantile" );
Set Gradient Scale Values
Syntax: obj << Set Gradient Scale Values( [value1,value1, ... value N] )
Description: Sets a custom set of values for use in the gradient's scale.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Little Pond.jmp" );
gb = Graph Builder( Variables( X( :X ), Y( :Y ), Color( :Z ) ), Elements( Contour( X, Y ) ) );
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Contour Seg( 1 ) );
seg << Set Gradient Scale Values( [-10.0, 0.0, 10.0] );
Set Gradient Show Missing
Syntax: obj << Set Gradient Show Missing( "Auto"|"On"|"Off"="Auto" )
Description: Sets when to show the legend entry for missing values. "Auto" by default.
JMP Version Added: 18
dt = Open( "$Sample_Data/Cities.jmp" );
gb = Graph Builder(
Variables( X( :city ), Y( :POP ), Color( :NO ) ),
Elements( Bar( X, Y ) )
);
frame = (gb << Report)[FrameBox( 1 )];
seg = frame << Find Seg( Bar Seg( 1 ) );
seg << Set Gradient Show Missing( "Off" );
Set Hide Missing Color
Syntax: obj << Set Hide Missing Color( true/false )
Random Reset( 1111111 );
n = 1000;
T1 = J( n, 1, Random Normal() );
T1[Loc( J( n, 1, Random Integer( 0, 1 ) ) )] = .;
dt = New Table( "Test",
New Column( "X", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "Y", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "T1", Values( T1 ) ),
);
obj = dt << Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Color( :T1 ) ),
Elements( Points( X, Y, Legend( 16 ) ) )
);
frame = Report( obj )[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Hide Missing Color( true );
Set Hide Missing Size
Syntax: obj << Set Hide Missing Size( true/false )
Random Reset( 1111111 );
n = 1000;
T1 = J( n, 1, Random Normal() );
T1[Loc( J( n, 1, Random Integer( 0, 1 ) ) )] = .;
dt = New Table( "Test",
New Column( "X", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "Y", Values( J( n, 1, Random Uniform() ) ) ),
New Column( "T1", Values( T1 ) ),
);
obj = dt << Graph Builder(
Size( 531, 456 ),
Show Control Panel( 0 ),
Variables( X( :X ), Y( :Y ), Size( :T1 ) ),
Elements( Points( X, Y, Legend( 16 ) ) )
);
frame = Report( obj )[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Hide Missing Size( true );
Set Jitter
Syntax: obj << Set Jitter( {method, axis, limit, spacing, seed, side, overlap, grid offset, smooth, max error, bandwidth} )
Description: Applies an offset to marker positions for collision reduction. method is none|random uniform|random normal|centered|centered grid|positive grid. axis is X|Y|XY. limit is the width of the jitter, adjusted for the method. spacing is the percentage of the marker size using for jittering or 0 for auto-adjustment.
JMP Version Added: 14
Open( "$SAMPLE_DATA/Big Class.jmp" );
r = Oneway( Y( :height ), X( :sex ), Means( 1 ), MeanDiamonds( 1 ), XAxisProportional( 0 ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
seg << Set Jitter( {"Grid", "X", 1, 0, 0, "Centered"} );
Set Label Value Axis
Syntax: obj << Set Label Value Axis( "X"|"Y" )
Description: Whether forced labels show the X or Y value.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Big Class.jmp" );
Bivariate(
Y( :weight ),
X( :height ),
SendToReport(
Dispatch( {}, "Bivar Plot", FrameBox,
{DispatchSeg(
Marker Seg( 1 ),
Set Force Labels( "Label by Value" ),
Set Label Value Axis( "X" ),
Set Label Value Format( "Fixed", 1 )
)}
)
)
);
Set Label Value Format
Syntax: obj << Set Label Value Format
Description: How to format the X or Y value; Auto means use axis format.
JMP Version Added: 18
Open( "$SAMPLE_DATA/Big Class.jmp" );
Bivariate(
Y( :weight ),
X( :height ),
SendToReport(
Dispatch( {}, "Bivar Plot", FrameBox,
{DispatchSeg(
Marker Seg( 1 ),
Set Force Labels( "Label by Value" ),
Set Label Value Axis( "X" ),
Set Label Value Format( "Fixed", 1 )
)}
)
)
);
Set Label Value Width
Syntax: obj << Set Label Value Width( number )
Description: Maximum width for a formatted label value.
JMP Version Added: 18
Set Marker
Syntax: obj << Set Marker( marker )
Description: Sets the marker style for all markers.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Marker( "Square" );
Set Marker Draw Column
Syntax: obj << Set Marker Draw Column( column )
Description: Sets a custom marker drawing data table column, which could be a picture, matrix of points, text, drawing code or a function.
JMP Version Added: 16
Open( "$SAMPLE_DATA/Big Class Families.jmp" );
r = Bivariate( Y( :height ), X( :weight ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
Wait( 2 );
seg << Set Marker Draw Column( :sex );
Wait( 2 );
seg << Set Marker Draw Column( :picture );
Set Marker Draw Expr
Syntax: obj << Set Marker Draw Expr( expr )
Description: Sets a custom marker drawing expression, which could be a matrix of points, text, drawing code or a function.
JMP Version Added: 16
Drawing function
Open( "$SAMPLE_DATA/Big Class.jmp" );
r = Bivariate( Y( :height ), X( :weight ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
seg << Set Marker Draw Expr(
Function( {this seg, this row, x, y, size, row state},
If( Mod( this row, 2 ) == 1,
Line(
Eval List( {x, y} ),
Eval List( {:weight[this row + 1], :height[this row + 1]} )
);
"A";
,
"B"
)
)
);
Drawing script
Open( "$SAMPLE_DATA/Big Class.jmp" );
r = Bivariate( Y( :height ), X( :weight ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
seg << Set Marker Draw Expr( Expr( Arc( -2, -:age / 3, 2, :age / 3, -90, 90 ) ) );
Matrix polyline
Open( "$SAMPLE_DATA/Big Class.jmp" );
r = Bivariate( Y( :height ), X( :weight ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
seg << Set Marker Draw Expr( [-1 0, 0 2, 1 0, 0 1, -1 0] );
Text
Open( "$SAMPLE_DATA/Big Class.jmp" );
r = Bivariate( Y( :height ), X( :weight ) );
frame = (r << report)[FrameBox( 1 )];
seg = (frame << FindSeg( Marker Seg( 1 ) ));
seg << Set Marker Draw Expr( Expr( :sex || Char( :age ) ) );
Set Marker Size
Syntax: obj << Set Marker Size
Description: Sets the size for the markers. Size options are Dot, Small, Medium, Large, XL, XXL, and XXXL.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Marker Size( "XL" );
Wait( 1 );
seg << Set Marker Size( "dot" );
Set Overlay Color
Syntax: obj << Set Overlay Color( marker index, color )
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
op = dt << Overlay Plot( X( :age ), Y( :height, :weight ) );
rep = op << report;
frame = rep[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Overlay Color( 1, "Green" );
Set Overlay Marker
Syntax: obj << Set Overlay Marker( marker index, marker )
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
op = dt << Overlay Plot( X( :age ), Y( :height, :weight ) );
rep = op << report;
frame = rep[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Overlay Marker( 1, "Star" );
Set Transparency
Syntax: obj << Set Transparency( number )
Description: Sets the marker transparency. The argument should be a numeric value between 0 and 1.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Transparency( .3 );
Sib
Syntax: seg2 = obj << Sib
Description: Returns the sibling of the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Sib;
Sib Append
Syntax: obj << Sib Append( seg2 )
Description: Adds a display seg immediately after the display seg.
win = New Window( "World",
gb = Graph(
FrameSize( 800, 400 ),
X Scale( -180, 180 ),
Y Scale( -90, 90 ),
<<Background Map( Images( "Simple Earth" ) )
)
);
imgBox = win[framebox( 1 )];
mapSeg = imgBox << FindSeg( MapSeg( 1 ) );
mapSeg << Transparency( 0.5 );
Try(
xAxis = gb[AxisBox( 2 )];
xMin = (xAxis << get min);
xMax = (xAxis << get max);
,
xMin = 0;
xMax = 100;
);
yAxis = gb[AxisBox( 1 )];
yMin = (yAxis << get min);
yMax = (yAxis << get max);
xval = Matrix( {xmin, xmax} );
yval = Matrix( {ymin, ymax} );
mapSeg << Sib Append( Line Seg( xval, yval, <<line color( "Green" ), <<line width( 3 ) ) );
Sib Prepend
Syntax: obj << Sib Prepend( seg2 )
Description: Adds a display seg immediately before the display seg.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
Try(
xAxis = g[AxisBox( 2 )];
xMin = (xAxis << get min);
xMax = (xAxis << get max);
,
xMin = 0;
xMax = 100;
);
yAxis = g[AxisBox( 1 )];
yMin = (yAxis << get min);
yMax = (yAxis << get max);
xval = Matrix( {xmin, xmax} );
yval = Matrix( {ymin, ymax} );
seg << Sib Prepend( Line Seg( xval, yval, <<line color( "Green" ), <<line width( 3 ) ) );
Transparency
Syntax: obj << Transparency( number )
Description: Sets the marker transparency. The argument should be a numeric value between 0 and 1.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
xx = Column( "height" ) << Get Values;
aa = [=> 0];
sz = Column( "age" ) << get values;
yy = J( N Rows( xx ), 1, 0 );
For( ii = 1, ii <= N Rows( xx ), ii++,
aa[xx[ii]]++;
yy[ii] = aa[xx[ii]];
);
New Window( "Marker Seg Example",
g = Graph Box(
Frame Size( 300, 120 ),
X Scale( Min( xx ) - 5, Max( xx ) + 5 ),
Y Scale( 0, 10 ),
Marker Seg( xx, yy, Row States( dt ) )
)
);
frame = g[FrameBox( 1 )];
seg = (frame << Find Seg( Marker Seg( 1 ) ));
seg << Set Transparency( .3 );
Shared Item Messages
Enabled
Syntax: obj << Enabled( state=0|1 );state = obj << Get Enabled
Description: An object that is not enabled will not respond to keyboard or mouse input. This property is inherited by child objects, so a container object that is disabled will cause all descendent objects to be disabled.
//This message applies to all display objects
New Window( "enabled",
V List Box(
check = Check Box(
{"Use Password"},
ptext << Enabled( check << Get( 1 ) );
pvalue << Enabled( check << Get( 1 ) );
),
Lineup Box( N Col( 2 ),
Text Box( "Username:" ),
Text Edit Box( "", <<Set Width( 100 ) ),
ptext = Text Box( "Password:", <<Enabled( 0 ) ),
pvalue = Text Edit Box( "",
<<Password Style( 1 ),
<<Set Width( 20 ),
<<Enabled( 0 )
)
)
)
);
Get Enabled
Syntax: obj << Enabled( state=0|1 );state = obj << Get Enabled
Description: An object that is not enabled will not respond to keyboard or mouse input. This property is inherited by child objects, so a container object that is disabled will cause all descendent objects to be disabled.
//This message applies to all display objects
New Window( "enabled",
V List Box(
check = Check Box(
{"Use Password"},
ptext << Enabled( check << Get( 1 ) );
pvalue << Enabled( check << Get( 1 ) );
),
Lineup Box( N Col( 2 ),
Text Box( "Username:" ),
Text Edit Box( "", <<Set Width( 100 ) ),
ptext = Text Box( "Password:", <<Enabled( 0 ) ),
pvalue = Text Edit Box( "",
<<Password Style( 1 ),
<<Set Width( 20 ),
<<Enabled( 0 )
)
)
)
);
Get Namespace
Syntax: obj << Get Namespace
Description: Returns the namespace associated with this display object.
//This message applies to all display objects
x = 1;
w = New Window( "Test", b = Button Box( "Press me" ) );
b:x = 2;
ns = b << GetNamespace();
Show( ns:x, x );
Get Properties
Syntax: obj << Get Properties
Description: Returns an associative array that contains the display box's properties and their values.
New Window( "Example", bb = Button Box( "Press Me", Print( "Pressed" ) ) );
bb << Get Properties;
Get Property
Syntax: obj << Get Property( "property" )
Description: Returns the current setting for the named property.
New Window( "Example", bb = Button Box( "Press Me", Print( "Pressed" ) ) );
bb << Get Property( "Enabled" );
Get Property List
Syntax: obj << Get Property List
Description: Returns a list of properties the display box has.
New Window( "Example", bb = Button Box( "Press Me", Print( "Pressed" ) ) );
bb << Get Property List;
Set Property
Syntax: obj << Set Property( "property", value )
Description: Sets the value for the named property for the display box.
New Window( "Example", bb = Button Box( "Press Me", Print( "Pressed" ) ) );
bb << Set Property( "Enabled", 0 );