bigTree
bigTree

Reputation: 2173

Plotting heatmaps in python

I am using heatmap.py to plot a heatmap on python. I read on the doc (same page in the details section) that 'points' is "an iteratable list of tuples, where the contents are the | x,y coordinates to plot. e.g., [(1, 1), (2, 2), (3, 3)]"

Therefore, we can specify the points (x,y) to color, but how is it possible to specify the intensity of each point (x,y)?

Upvotes: 1

Views: 864

Answers (1)

mbatchkarov
mbatchkarov

Reputation: 16039

You do not directly specify the intensity, it is inferred from the number of points you place at any given coordinates. From the documentation:

The dot is placed into the output image for each input point at the translated output image coordinate. […] Dots are blended into the output image with an additive process: as points are placed on top of each other, they become darker. After all input points have been blended into the output image, the ouput image is colored based on the darkness of each pixel.

It seems you can make an area of the heat map more intense by adding more points the lie in that area.

Upvotes: 2

Related Questions