Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
Level II

## Color cells and points discretely

I have a column with continuous data (millimeters) and I would like to color the cells according to spec and warn limits. The coloring should be discrete, not continuous. When creating a plot using Graph Builder, the points should be colored in the same way as the cells.

This is the desired coloring:

< -4: red

>= -4 and <-2: yellow

>=-2 and <=2: green

>2 and <=5: yellow

>5: red

I tried using the column property "color gradient", but on the one hand it seems strange to use a color gradient to achieve discrete coloring, and on the other hand the scaling of the gradient adapts to the values in the column as soon a s I try using the column for coloring in Graph Builder, and in consequence the colors don't fit the values any more.

Thanks for any suggestion for a solution.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User

## Re: Color cells and points discretely

I think this is quite a common thing to want to do, and there is probably more than one way to approach it. The problem is that JMP wants to use gradients for continuous data whereas we want discrete colour coding.  The solution is to create a discrete variable that can accommodate these colours - then in graph builder you use this new variable as the 'colour' variable.

Below the status column converts height into discrete levels that can be used for colour:

And here is the formula for the status column:

I've attached a sample table.

-Dave
2 REPLIES 2
Highlighted
Super User

## Re: Color cells and points discretely

I think this is quite a common thing to want to do, and there is probably more than one way to approach it. The problem is that JMP wants to use gradients for continuous data whereas we want discrete colour coding.  The solution is to create a discrete variable that can accommodate these colours - then in graph builder you use this new variable as the 'colour' variable.

Below the status column converts height into discrete levels that can be used for colour:

And here is the formula for the status column:

I've attached a sample table.

-Dave
Highlighted
Super User

## Re: Color cells and points discretely

As a separate comment aimed at JMP enhancement requests - it would be really nice to be able to have a continuous colour gradient that is calibrated against specification levels rather than the range of the data.  I can achieve this using scripting, but even then it is hard work.

-Dave
Article Labels