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

Making heat map- How do I define the values for each color in the gradient?

So I am making a heat map, and my color gradient goes from green, to black in the center, to red. I would like to customize my gradient so that the black extends from exactly -1 to +1. My data set range is -2 (green) to 7 (red). So with me wanting the black area to extend from -1 to +1, this makes the gradient lopsided with the red area being much longer, which is fine. But since it is lopsided towards the green end it is possible for me to have a nice crisp edge between the green and black at -1 just using the slider tool. But a side effect of this is that the gradient between the black and red is much more gradual and I basically can't get the black edge to be around +1. This makes a large swatch of my data points a muddy dark red, when I would like for there to be a little bit more solid red. Is there a way to customize in this way?

3 REPLIES 3

Re: Making heat map- How do I define the values for each color in the gradient?

Commenting to add: I have the same issue when I try to use the "discrete colors" option

Thierry_S
Super User

Re: Making heat map- How do I define the values for each color in the gradient?

Hi,

May I ask you which platform you use in JMP to make your heat map? From your description, it looks like you are using Graph Builder.

As you may already know, you can specify the Min, Max, and Center values in Graph Builder: Right Click on the Gradient legend, Select "Gradient," and set the Min = -2, Max = 7, and Center = 0. These simple steps may not produce the desired outcome yet, but give it a try

Hence, you may want to experiment with the JSL function "Add Color Theme."

Names Default To Here( 1 );
Add Color Theme( {"Yellow To Blue", 0, {{255, 255, 0}, {0, 0, 255}}, {0.0, 1.0}} );

The first parameter is the name of your color theme, the second parameter is a flag, the first list represents the RGB colors for each position, and the final list represents the relative position of each color (between 0 and 1). Computing the relative position of each color will require converting the range of your data to a 0 to 1 scale.

Let us know if it makes sense.

Best,

TS

 

 

Thierry R. Sornasse
Craige_Hales
Super User

Re: Making heat map- How do I define the values for each color in the gradient?

see Gradient Function  for one idea.

Craige