cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
KinKame
Level IV

tabulate report

anyone knows if tabulate report can be color using

<< Set Property ( "Color Gradient"... property?

best regards.

Lionel

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: tabulate report

You can't set the colors of a tabulation, but you can create your own display using tablebox, stringcolbox and numbercolbox.

If you go to Preferences > Reports > Manage Rules, you can create a rule to simulate a gradient.  Then apply the rule to a number col box and you're in business.

View solution in original post

10 REPLIES 10
txnelson
Super User

Re: tabulate report

The tabulate report can not be colored.  However, the results from the Tabulate can be made into a data table by selecting from the Red Triangle, :Make into Data Table:.  The results can then be colored.

You can see all of the functionality for a given Platform by going to

     Help==>Scripting Index

and then look for the Tabulate

Jim
KinKame
Level IV

Re: tabulate report

ok thank you.

not helpful in my case. I can create table and with cell color code ... but it wuold have been nice to get this feature !!

pmroz
Super User

Re: tabulate report

You can't set the colors of a tabulation, but you can create your own display using tablebox, stringcolbox and numbercolbox.

If you go to Preferences > Reports > Manage Rules, you can create a rule to simulate a gradient.  Then apply the rule to a number col box and you're in business.

ms
Super User (Alumni) ms
Super User (Alumni)

Re: tabulate report

Thanks PMroz! That's a cool feature I have been totally unaware about until now.

txnelson
Super User

Re: tabulate report

Add me to the list of appreciators.   I was not aware of this either.........

I did some searching, and failed to find how the rules can be build programmatically.  PMroz, are you aware of how this can be done?

Jim
pmroz
Super User

Re: tabulate report

OK you've successfully goaded me into providing an example.  Here 'tis.  Colors were set up manually; you could probably program this easily.

11381_Sample Gradient.png

// Create a conditional formatting rule that uses rainbow colors for 0-100

preferences(

      Conditional Formatting Rules(

            RuleSet(

                  RuleName( "Gradient 0-100" ),

                  Range( MinValue( 0 ), MaxValue( 10 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {240, 78, 0} ), Format( Back Color( {255, 0, 0} ) )

                  ),

                  Range( MinValue( 10 ), MaxValue( 20 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {208, 254, 24} ), Format( Back Color( {243, 147, 1} ) )

                  ),

                  Range( MinValue( 30 ), MaxValue( 40 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {29, 254, 34} ), Format( Back Color( {242, 254, 10} ) )

                  ),

                  Range( MinValue( 40 ), MaxValue( 50 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {35, 254, 210} ), Format( Back Color( {51, 254, 22} ) )

                  ),

                  Range( MinValue( 50 ), MaxValue( 60 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {4, 11, 255} ), Format( Back Color( {44, 233, 254} ) )

                  ),

                  Range( MinValue( 60 ), MaxValue( 70 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {122, 14, 254} ), Format( Back Color( {16, 34, 254} ) )

                  ),

                  Range( MinValue( 70 ), MaxValue( 80 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {254, 18, 236} ), Format( Back Color( {114, 10, 254} ) )

                  ),

                  Range( MinValue( 80 ), MaxValue( 90 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {254, 14, 152} ), Format( Back Color( {237, 9, 255} ) )

                  ),

                  Range( MinValue( 90 ), MaxValue( 100 ), InclusiveStart( 0 ), InclusiveEnd( 1 ),

                        EndBackColor( {244, 0, 18} ), Format( Back Color( {255, 21, 145} ) )

                  )

            )

      ),

);

// Create a table to test things out with

dt = New Table( "test gradient", Add Rows( 10 ),

      New Column( "Factor1", Numeric, Continuous, Format( "Best", 12 ),

            Set Values(

                  [13.6854337062687, 17.3569041769952, 17.9111931007355, 49.1005608113483,

                  57.4445765465498, 57.5570550980046, 61.441846890375, 70.2064076205715,

                  77.4806626606733, 94.3617827259004] ) ),

      New Column( "Factor2", Numeric, Continuous, Format( "Best", 12 ),

            Set Values(

                  [23.8564028637484, 82.8440769342706, 6.53149569407105, 65.9139207797125,

                  24.9276944668964, 29.2392280884087, 7.34108469914645, 65.837666625157,

                  87.6187813701108, 64.2478915164247] ) )

);

// Create a window using all of this

f1_list = dt:factor1 << get values;

f2_list = dt:factor2 << get values;

new window("Big Class Gradient",

      tablebox(

            ncb1 = numbercolbox("Factor 1", f1_list),

            ncb2 = numbercolbox("Factor 2", f2_list),

      ),

);

ncb1 << set conditional format("Gradient 0-100");

ncb2 << set conditional format("Gradient 0-100");

pmroz
Super User

Re: tabulate report

The documentation on conditional formatting is kind of light.  I figured this out by manually creating a new conditional format (under preferences), and then opening a script window and entering:

p = get preferences();

You can get the code for conditional formatting out of the log window.

txnelson
Super User

Re: tabulate report

As said in the old country.......Uff-da dats goot

Very, very useful........JMP support will get an email from me, pushing for better documentation, and maybe a function or two to aid in the creation.

Jim
pmroz
Super User

Re: tabulate report

Just realized I left out the data range 20-30.  I'll leave that as an exercise for the reader...