I have a dictionary of tuples of two non-negative integers (a,b), with a and b both at most 20. The dictionary maps each tuple to a float value between zero and one. I would like to create a two-dimensional grid where the unit square in the i-th column and the j-th row (corresponding to the tuple (i,j)) is colored with a grayscale value between white and black and proportional to its float value.
To clarify, my dictionary looks something like:
dict={(0, 0) : 0.04679,
(0, 2) : 0.10936,
(0, 4) : 0.17872000000000005,
(2, 4) : 0.15046000000000004,
(4, 4) : 0.026240000000000003,
(1, 1) : 0.02055,
(1, 2) : 0.10275
...
}
I am unsure how to go about plotting this. Any help would be appreciated!
