cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
JWi
JWi
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
David_Burnham
Super User (Alumni)

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:

 

image.png

 

And here is the formula for the status column:

 

image.png

 

I've attached a sample table.  

 

 

 

 

-Dave

View solution in original post

2 REPLIES 2
David_Burnham
Super User (Alumni)

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:

 

image.png

 

And here is the formula for the status column:

 

image.png

 

I've attached a sample table.  

 

 

 

 

-Dave
David_Burnham
Super User (Alumni)

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