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


To add a legend to a graph, send the Row Legend message to the frame box. In the Row Legend message, specify which column you want to base the legend on and whether the legend affects colors and markers.
For example, using Big Class.jmp, submit the following JSL to turn on a legend based on the age column. Set both colors and markers by values in the age column.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( y( :height ), x( :weight ) );
framebox << Row Legend( "age", Color( 1 ), Marker( 1 ) );
The Color() and Marker() arguments are optional. Colors are on and markers are off by default.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
biv = dt << Bivariate( y( :weight ), x( :height ) );
framebox << Row Legend( "age", Color( 1 ), Continuous Scale( 1 ) );
To interactively add a legend, right-click the graph, select Row Legend, and change the column settings.