---
title: "Matrix heatmap in Vista | Oplema"
description: "Make a matrix heatmap in Vista that colors one cell per pair of categories by a calculated value, such as cups by store and drink, up to 10,000 cells."
url: "https://oplema.com/docs/vista/heatmaps/matrix-heatmap"
updated: "2026-11-04"
---

# Matrix heatmap

Matrix heatmap draws one cell per pair of categories and colors it by a value calculated from the rows in that intersection.

## Compare cups by store and drink

Nine cells cross three stores with three drinks. Each store has its own best seller at 30 cups: Coffee in North, Cocoa in Central and Tea in South.

Result
| Store | Drink | Cups |
| --- | --- | --- |
| North | Tea | 10 |
| North | Coffee | 30 |
| North | Cocoa | 20 |
| Central | Tea | 20 |
| Central | Coffee | 10 |
| Central | Cocoa | 30 |
| South | Tea | 30 |
| South | Coffee | 20 |

1. In the Data tab, swap Horizontal group and Vertical group to flip the grid.
2. Change Operation from `Sum` to `Average`. The cell values and colors update.
3. Open the Design tab and expand Cells, then change Cell content from `Color + number` to `Color`.

## When to use

Use Matrix heatmap to find highs and lows across two categories, such as which drink leads in which store. To see how numeric columns relate to each other, use Correlation matrix.

## Inputs

1 port

**Table**

Accepts: Tables.

Accepts one connection on this port.

## Settings

A heatmap can show up to 10,000 cells.

**Horizontal group**

Column for the categories on the horizontal axis. Auto picks a readable one.

**Group dates by**

How dates in this field are grouped, such as by day, month or year.

Default: `Day`

Options: Exact, Second, Minute, Hour, Day, Week, Month, Quarter, Year, Month of year, Day of week, Hour of day.

**Grouping**

Groups each number on its own, or into equal-width ranges.

Default: `Individual values`

Options: Individual values, Fixed-width ranges.

**Vertical group**

Column for the categories on the vertical axis. Auto picks a readable one.

**Cell value**

Column calculated into each cell's color. Auto picks one with varied values.

**Operation**

How the value column is calculated for each category. Columns that aren't numeric are counted.

Default: `Sum`

Options: Sum, Average, Median, Minimum, Maximum, 25th percentile, 75th percentile, 90th percentile, 95th percentile, Percentile, First by time, Last by time, Count values, Count distinct, Count rows, Count true, Percentage true.

**Sort X labels**

Order of the X axis labels.

Default: `Default`

Options: Default, Ascending, Descending.

**Sort Y labels**

Order of the Y axis labels.

Default: `Default`

Options: Default, Ascending, Descending.

35 more settings

**Show tooltip**

Shows or hides values when you hover over a mark.

Default: `true`

**Tooltip**

Text shown when you hover over a mark. Write it in the editor and insert values from Values.

**Values**

Values you can insert into the text. Each row calculates a value from a source field or, in charts, shows a chart value, and can have its own number or date format.

**Title**

Title shown inside the chart. Leave empty to hide it.

**Title color**

Color of the title.

**Title size**

Size of the title, in pixels.

Default: `24`

**Title alignment (plot)**

Alignment of the title.

Default: `Left`

Options: Left, Center, Right.

**Cell content**

Colors the cells, shows the numbers or both.

Default: `Color`

Options: Color, Number, Color + number.

**Number scale**

Unit for value labels. Every tick is divided by it.

Default: `None`

Options: None, Thousands (K), Millions (M), Billions (B).

**Prefix**

Text before each cell number.

**Suffix**

Text after each cell number.

**Cell outlines**

Shows or hides a border around each cell.

Default: `false`

**Number size**

Size of the cell numbers, in pixels (8–24).

Default: `10`

**Number color**

Color of the cell numbers.

**Outline color**

Color of the cell borders. Auto uses the theme's grid color.

**Axis titles**

Shows or hides the titles on both axes.

Default: `true`

**Horizontal title**

Title of the X axis. Leave empty to use the field names.

**Vertical title**

Title of the Y axis. Leave empty to use the field names.

**Axis label size**

Size of the X axis labels, in pixels.

Default: `12`

**X label angle**

Angle of the X axis labels. Auto turns them when they don't fit.

Default: `Auto`

Options: Auto, 0°, 45°, 90°.

**Tick color**

Color of the axis labels.

**Axis title color**

Color of the axis titles. Auto matches the axis labels.

**X title size**

Size of the X axis title, in pixels.

Default: `12`

**X title distance**

Extra space between the X axis labels and the title, in pixels.

Default: `4`

**Y title size**

Size of the Y axis title, in pixels.

Default: `12`

**Y title distance**

Extra space between the Y axis labels and the title, in pixels.

Default: `4`

**Background**

Card background color. Auto follows the theme.

**Plot padding**

Space between the card edge and the chart, in pixels.

Default: `0`

**Axis frame**

Shows or hides the axis lines around the plot.

Default: `true`

**Frame color**

Color of the axis lines.

**Decimal places**

Most decimal places shown on value-axis labels and in tooltips.

Default: `2`

**Always show decimal places**

Pads values to the decimal places, so with 2, 2630 shows as 2,630.00.

Default: `false`

**Thousands separators**

Groups digits, so 2630 shows as 2,630.

Default: `true`

**Corner radius (px)**

Corner radius in whole logical pixels.

Default: `0`

**Border width (px)**

Border width in whole logical pixels.

Default: `0`

## Matrix heatmap FAQs

**How does a matrix heatmap treat dates?**

A date group uses calendar periods with equal spacing, so each period gets a same-sized cell.

### Chart your data. Build it in Vista.

Vista opens in your browser, with no account.

[Open Vista](https://oplema.com/editor?path=%2F%3Fopen%3Dvista) [About Vista](https://oplema.com/vista)
