2

I have an array called defined as:

heatmap = [[0 for y in range(h)] for range x in range (w)]

which contains only integers.

I'd like to know how, if there is any way at all, to turn this two dimensional array of ints into a heat map similar to the one you can find here.

Sorry if this is vague, I'm at school right now, but I will try to answer any questions as fast as possible

  • A 2-dimensional array only has enough information to have x and y coordinates, it doesn't contain a "heat" value to display at the location. How are you planning on getting that? – Chachmu Feb 27 '17 at 18:26
  • @Chachmu - I just made an edit to the code I showed which may explain the confusion, though I'm not sure. Basically this array allows me to call for: `heatmap[0][6]` and have whatever that has been previously set to in response. That works and I've tested it (using python by the way). Now I'd like to find out a way to generate a heat map with those "heat" values. – Yuval Karoly Feb 27 '17 at 23:36

0 Answers0