StatFas emblem: a philosopher beside a rising bar chart StatFas.comAn Easy Way to Do Statistics
Upload Data, and Get Publishable Results in a Few Seconds in APA7 format Docx file

Heatmap: How to Make It Online and Add It to Your Paper (APA7)

A heatmap shows a table of numbers as coloured cells, so patterns in large matrices become visible at a glance.

What is Heatmap?

A heatmap shows a table of numbers as coloured cells, so patterns in large matrices become visible at a glance.

When to use it

Use it to display a correlation matrix among many variables, a table of means across conditions, or any grid of values where colour can show strength and direction.

Example question: Which of my five scales are most strongly related to each other?

Preparing your data

A matrix: rows and columns are variables or conditions and each cell is a number. For a correlation heatmap, supply raw data (one column per variable) and compute the correlations.

Example dataset (simulated; first rows of 200): five numeric variables, one row per participant (N = 200).

motivationengagementstressanxietysleep
-0.221.29-0.81-0.632.12
-2.29-0.840.691.080.19
-0.82-3.040.361.380.65
-0.71.59-3.2-0.89-0.11
-1.15-0.012.470.71-0.42
-2.29-0.280.71-1.411.25

Download the full example CSV to practise. If the tool asks for a different layout, follow the instructions on its page.

How to run it on StatFas

  1. Open the Heatmap tool. You do not need an account to run an analysis.
  2. Enter your data or upload your file, laid out as described in Preparing your data.
  3. Select your variables. Choose the numeric variables to include or paste the matrix. Pick a colour scale: a diverging scale (two colours with a neutral middle) for correlations, a single-colour scale for counts.
  4. Choose any options the tool offers (for example the confidence level, a post hoc test or the error bar type) and run the analysis.
  5. Read the results on the page. Check the assumptions first, then the test statistic, the p-value and the effect size.
  6. To save your results, log in or create a free account. Every analysis stays free; the account is only needed to download.

Assumptions and checks

  • Use a diverging colour scale centred on zero for correlations so that positive and negative values look different.
  • Print the numbers in the cells; colour alone is imprecise.
  • Choose a colour-blind-safe palette and check that the figure remains readable in grayscale.
  • Order variables sensibly (for example by scale) so that blocks of related variables sit together.

Key numbers to look at

  • Colour intensity: the size of each value.
  • Colour hue: the direction (positive or negative) on a diverging scale.
  • Printed values: use two decimals and no leading zero for correlations.
  • Legend showing the scale range.

Effect size

A heatmap displays effect sizes, such as correlations, but it is not a test. Report significance in a table or note.

Benchmarks such as small, medium and large are conventions (Cohen, 1988), not rules. Interpret size in the context of your field.

Reporting Heatmap in APA7 style

Template

Figure 1
Correlations Among Study Variables
[figure]
Note. N = XXX. Cell values are Pearson correlations. Darker cells indicate stronger relationships.

Worked example (simulated data)

The numbers below were computed from the example CSV above, so you can reproduce them. They illustrate the format and are not real findings.

Motivation and engagement were positively correlated (r = .45), whereas anxiety and sleep were negatively correlated (r = −.23; Figure 1).
Variablemotivationengagementstressanxietysleep
motivation—.45−.29.05−.06
engagement.45—−.20−.08.00
stress−.29−.20—.32−.09
anxiety.05−.08.32—−.23
sleep−.06.00−.09−.23—

Figure caption (APA7 style)

Figure 1
Correlations Among Study Variables
Note. N = 200. Cell values are Pearson correlations; darker cells indicate stronger relationships.

APA7 reminders: italicise statistical symbols (M, SD, t, F, p, r), report exact p-values to two or three decimals (use p < .001 for very small values), omit the leading zero for values that cannot exceed 1 (.45, not 0.45), and put degrees of freedom in parentheses. See the APA7 cheat sheet.

Common mistakes

  • Using a rainbow colour scale, which creates false boundaries.
  • Showing colour without the numbers, so readers cannot read exact values.
  • Interpreting colour as significance; correlation size is not the same as statistical significance.
  • Correlation: To compute and test the correlations.
  • PCA: To reduce many correlated variables to a few components.
  • EFA: To explore which variables group together.

Not sure which analysis you need? Use the test chooser.

Frequently asked questions

Is a heatmap the same as a correlation matrix?

A correlation matrix is the table of numbers. A heatmap is a coloured picture of such a table.

Which colours should I choose?

Use a diverging, colour-blind-safe pair such as blue and orange with a light neutral middle for correlations.

References

American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000

This guide is for learning and for preparing results for your own reports. You remain responsible for choosing an appropriate analysis, checking its assumptions and interpreting the results. Follow the formatting rules of your journal or institution where they differ from APA7.