I wanted to do some shading in a table according to its values. For example, if you see the table below:
a b c d
a 90 10 0 0
b 0 80 10 10
c 0 0 95 5
d 0 10 5 85
I want to shade automatically each numeric cell with a mixture of black and white according to its value. That is, (a,a) = 90
should be something like black!90
, and (c,d) = 5
should be black!5
. Also, if you can parametrized the shading operation so one can define the color and if we use the value or the complement that would be great.
I was thinking in something like Drawing different tikz shapes parameterized by data from a file, but I cannot see how can one achieve that in a table.
Can you give me some advice on how to achieve such automatic styling?