Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Re: Color Cells based on formula result and display using tabulate.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Color Cells based on formula result and display using tabulate.

May 13, 2018 3:03 PM
(2835 views)

I am using tabulate command to display data from a table along with a graph.I have colored the cells in the data table based on a condition.

Lets say if temperature < 5 color = red, 10<temperature<20 color = blue etc.

I am then using tabulate function to create table from this.But the cell color doesnt seem to show up in the final output table.

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Color Cells based on formula result and display using tabulate.

The Tabulate Platform does not support cell color. The displayed output from Tabulate is not a data table. However, you can have the platform generate a data table from the displayed output, and then you can color those cells. Look under the red triangle for the "Make into data table" option.

Jim

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Color Cells based on formula result and display using tabulate.

Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Color Cells based on formula result and display using tabulate.

Just a quick note on several alternatives:

- Use Table Summary and color rows
- From the Tabulate menu, select Make Into Data Table and color that display
- Write a script to make a custom display table.
- If possible, create a graph to represent the table. If it is complex, this is likely not feasible. Below is a simple example. The Graph Builder label is Percent of Total. Note that the bar colors are custom: 12-13 Blue, 14-16 Green, 17+ Red.

Highlighted
##

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Color Cells based on formula result and display using tabulate.

This is helpful but I have a 20x20 data table.I have to loop through each cell, check the value and color it accordingly.

Eg : I have age1 - age10 columns.I need to color all cells withe age <20 as blue.

How can I do this?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Color Cells based on formula result and display using tabulate.

You did not mention which version of JMP that you are using.

You should look up in the Scripting Index, Color Cells. You can find it by typing "cell" as the search string for the objects messages. This is a column message. The first argument is the color, the second argument is the row list or ro reference. If no rows are specified then all rows in that column are colored. This is copied from Example 3.

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
a = {1, 3, 5};
b = {2, 4, 6};
:height << color cells( {{"Red", a}, {"blue", b}} );
```

Here is another example, using a For loop, that selects columns based upon their names an row condition. I like to use custom colors, lighter colors so the numbers are readable.

Names Default To Here( 1 );

dt = Open( "$SAMPLE_DATA/Blood Pressure.jmp" );

nme = dt << get column names( String );

_xx = dt << get rows where( :Dose == "Control" );

For( i = 3, i <= N Items( nme ), i++,

If( Contains( nme[i], "8" ),

Column( dt, i ) << color cells( RGB Color( 122, 235, 235 ), _xx )

) //end if

); //end for

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Color Cells based on formula result and display using tabulate.

With inputs from all you guys I am able to make a data table from tabulate and color cells based on formula result.

I now need to display this table along with the graph.(I was doing this with tabulate earlier)

Is there an easy way to do this? Sorry new to jmp and have lot of questions.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Re: Color Cells based on formula result and display using tabulate.