What is a Heat Map?

The easiest way to understand a heat map is to think of a cross table or spreadsheet which contains colors instead of numbers. The default color gradient sets the lowest value in the heat map to dark blue, the highest value to a bright red, and mid-range values to light gray, with a corresponding transition (or gradient) between these extremes. Heat maps are well-suited for visualizing large amounts of multi-dimensional data and can be used to identify clusters of rows with similar values, as these are displayed as areas of similar color.


The example below shows how the values in the table are displayed as color gradients in the heat map cells.


As the examples below will illustrate; how to set up a heat map depends on the format of your data.

Data in tall/skinny format:

In this example, the data is in tall/skinny format, and each data table row corresponds to a single cell in the heat map.


The column Test is selected on the Y-axis, Time on the X-axis, and the cell values are set to the column Result. Like in other visualizations, highlighting and marking in the heat map are applied to one or more rows in the underlying data table. This means that with the setup in this example, marking a row in the table will mark a cell in the heat map.

Data in short/wide format:

In this example, the data is in short/wide format instead, and each row in the data table corresponds to an entire row in the heat map.


The Y-axis in this heat map is set up with the column Test, while the X-axis is set to (None). For the individual cell values in the heat map, the columns Time 1, Time 2, and Time 3 are selected. Cell value columns are always aggregated unless the Y-axis is set to (Row Number). This is because the data table may contain many rows with the same name, and the values in these rows must then be aggregated to one single value to be displayed in the heat map. The content of the data is the same as in the example with data in tall/skinny format, but the format of the data makes it necessary to set up the heat map in a different way. With data in short/wide format, this is a common way to set up a heat map.


It is often useful to combine heat maps with hierarchical clustering, which is a way of arranging items in a hierarchy based on the distance or similarity between them. The result of a clustering calculation is presented either as the distance or the similarity between the clustered items depending on the selected distance measure. See Distance Measures Overview and the detailed description for each measure for further information. To learn more about hierarchical clustering in general, see Overview of Hierarchical Clustering Theory. You can cluster both rows and columns in the heat map. The result of a hierarchical clustering calculation is displayed in a heat map as a dendrogram, which is a tree-structure of the hierarchy. Row dendrograms show the distance (or similarity) between rows and which nodes each row belongs to as a result of the clustering calculation. Column dendrograms show the distance (or similarity) between the variables (the selected cell value columns). The example below shows a heat map with a row dendrogram where the distance between the rows were calculated.


As a result of the clustering calculation, the rows in the heat map have been reordered to correspond to the cluster calculation. Test A and Test E are placed in the same cluster. Test F and Test B are placed together in another cluster, and this cluster forms another cluster together with Test C. Test D is not included in any of those clusters. This indicates that Test A and Test E are closer to each other than what they are to Test F, Test B, Test C, or Test D. It also indicates that Test D is the one that is the most distant to any of the other rows. See Dendrograms and Clustering to learn more about this.

All visualizations can be set up to show data limited by one or more markings in other visualizations only (details visualizations). Heat maps can also be limited by one or more filterings. Another alternative is to set up a heat map without any filtering at all. See Limiting What is Shown in Visualizations for more information.

See also:

How to Use the Heat Map

Heat Map Properties

Dendrograms and Clustering

Overview of Hierarchical Clustering Theory