Choose Language Hide Translation Bar
Highlighted
bernie426
Community Trekker

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,

0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Kevin_Anderson
Community Trekker

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
Highlighted
Kevin_Anderson
Community Trekker

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

bernie426
Community Trekker

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

Thanks, Kevin. It worked out great for me.

Many Thanks,