For the latest version of JMP Help, visit JMP.com/help.


Scripting Guide > Data Tables > Work with Rows > Assign Colors and Markers to Rows
Publication date: 07/24/2024

Assign Colors and Markers to Rows

You can use the Colors and Markers messages to assign (or change) colors and markers used for rows. These settings mostly affect graphs produced from the data table. Both messages expect numeric arguments to choose which color or marker to use. For more information about how numbers correspond to colors and markers, see Colors and Markers.

dt << Colors( 3 );  // set selected rows to red
dt << Markers( 2 ); // pick the X marker for selected rows

As with other row messages, you can stack selection and other messages together:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Select Where( :age == 12 ) // select the youngest subjects
	 << Colors( 8 ) << Markers( 8 ); // and use purple open circles for them

Color by Column sets colors according to the values of a column that you specify, and Marker by Column works similarly:

dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dt << Color by Column( :age );
dt << Marker by Column( :age );

Here are additional, named arguments:

Continuous Scale (Color by Column only) Assigns colors in a chromatic sequential fashion based on the values in the highlighted column.

Reverse Scale Reverses the color scheme in use.

Make Window with Legend Creates a separate window with a legend.

Excluded Rows Applies the row states to excluded rows.

Marker Theme Specifies the marker type.

Color Theme Specifies the color theme.

Want more information? Have questions? Get answers in the JMP User Community (community.jmp.com).