1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
test = Flatten[
   Table[{i, j, Log10[RandomReal[{0, 1*^10}]]}, {j, 1, 20}, {i, 1, 
     20}], 1];
divisions[dat_, bins_: 255] := Module[{l = Sort[dat], p, divs, n},
   n = Max[1, Round[Length[dat]/bins]];
   divs = First /@ Partition[l, n, n, 1, {}]
   ];

divs = divisions[test[[All, -1]]];

cf[x_?NumericQ] := 
 Module[{v = 1.`}, 
  Do[If[divs[[i]] >= x, v = i/Length[divs]; Break[]], {i, 1, 
    Length[divs]}]; ColorData["Rainbow", v]]
ListContourPlot[test, InterpolationOrder -> 0,
 Contours -> 20,
 ColorFunction -> Unevaluated[(cf[#]) &], 
 ColorFunctionScaling -> False]