cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Don’t miss your chance to experience Discovery Summit Europe at our best available rate! Early bird registration through 31 Oct.
  • Graph Builder Toolbar streamlines interactive graphing. Creates shortcuts on Report and GraphBuilder Helpers toolbars. Download and install the extension.
  • JMP will suspend normal business operations for our Rest and Recharge Day on Friday, October 2, 2026.
    Regular business hours will resume on Monday, October 5, 2026.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar
bernie426
Level II

How to color/marker selected rows based on multiple selection criteria?

Hi,

I am writing a script that is able to color and mark selected rows. Let's take the Big Class table as an example.

The following is my script, can anyone help out to get the selected rows to be colored to specific color like "Blue" and able add different marker for age =12 and age=13.

Open( "$SAMPLE_DATA/Big Class.jmp" );

  For Each Row( Selected(Row State()) = And ( Or (age == 13, age ==12), sex =="M"))= Color State( {0, 0, 225} );

  Color To RGB( Color Of( Selected( Row State() ) ));

Many Thanks,

1 ACCEPTED SOLUTION

Accepted Solutions
Kevin_Anderson
Level VI

Re: How to color/marker selected rows based on multiple selection criteria?

Hi, bernie426!

There's a bunch of ways to do this.  Here's one:

BigClass_dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

BigClass_dt << Select Where( And ( Or (age == 13, age ==12), sex =="M")) << Colors(RGB Color(0,0.333,0.667)) << Markers( "\!U2642" ) << Clear Select;

BigClass_dt << Select Where( And ( Or (age == 13, age ==12), sex =="F")) << Colors(RGB Color(0.376,0.248,0.376)) << Markers( "\!U2640" ) << Clear Select;

If you had many color and marker assignments to do, you might want to be a little less explicit.

View solution in original post

2 REPLIES 2
Kevin_Anderson
Level VI

Re: How to color/marker selected rows based on multiple selection criteria?

Hi, bernie426!

There's a bunch of ways to do this.  Here's one:

BigClass_dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

BigClass_dt << Select Where( And ( Or (age == 13, age ==12), sex =="M")) << Colors(RGB Color(0,0.333,0.667)) << Markers( "\!U2642" ) << Clear Select;

BigClass_dt << Select Where( And ( Or (age == 13, age ==12), sex =="F")) << Colors(RGB Color(0.376,0.248,0.376)) << Markers( "\!U2640" ) << Clear Select;

If you had many color and marker assignments to do, you might want to be a little less explicit.

bernie426
Level II

Re: How to color/marker selected rows based on multiple selection criteria?

Thanks, Kevin. It worked out great for me.

Many Thanks,

Recommended Articles