where vmX is the mean for the variable X, vsX is the standard deviation of variable X and N = the number of samples.

We then apply:

vnXY = (vXY - vmX) / vsX

where vnXY is the normalized value and vXY is the original value for the variable number X and sample number Y. For example, variable 1 in sample 1 is transformed like this:

vn11 = (v11 - vm1) / vs1 = (2 - 4) / 2 = -1

This gives the new matrix: vn1 vn2 vn3 s1 -1 -1 1.1339 s2 1 0 -0.3780 s3 0 1 -0.756

Each variable value is the delta from mean expressed in unit variance (meaning 1 equals the standard deviation).

The original matrix above was imported into Omics Explorer and plotted as a heat map just to show how the scale fits with the data:

Notice that s2v2 and s3v1 are black since their normalized values are 0 and that the positive values are shades of red and the negative values shades of green.

If you look at the color legend, you will see that it goes from -2.0 to 2.0 which means the scale goes from two standard deviations less than the mean to two standard deviations greater than the mean.

The actual color legend scale is calculated based on a quite complex algorithm. If you are not happy with the scale, you can set it manually from the "More plot Settings" dock window.