logo

What is a Heatmap? 📂Data Science

What is a Heatmap?

Definition

The graph of a function $f : \mathbb{R}^{2} \to \mathbb{R}$, when projected onto the $xy-$ plane and its value represented as color, is called a heatmap.

Explanation

cut_heatmap.png

The image above shows both the graph of $z = -4x e^{-(x^2+y^2)}$ (top) and its heatmap (bottom) in one picture. A heatmap, like this, turns a 3D graph into a 2D format using colors for ease of understanding. It is easier to view as it does not depend on the viewing angle, etc. It takes up less space compared to a 3D graph and, of course, it is drawn faster, making it economically more viable in terms of both time and space; hence it is widely used. Unless there is a special reason, it is common to view 3D graphs as heatmaps.

This is called a heatmap because it’s easy to understand if you think about how the screen of a thermal imaging camera, as shown in the picture below1, works. The screen of a thermal imaging camera doesn’t display temperature values as numbers or heights, but as colors for easy and immediate recognition.

Screenshot.png