PlotSet LogoPlotSet

How to Create a Heatmap

A step by step walkthrough for turning a row, column and value sheet into a published heatmap in PlotSet, from shaping the data to picking a colour scale that doesn't lie.

About 8 minutes

Rows and columns you chose, a colour scale that actually matches your data, a chart either embedded on a page or exported as an image: that's what you'll have after this guide on how to create a heatmap in PlotSet, built from your own grid rather than someone else's correlation matrix with your name on it, taken through the same click path a real PlotSet chart takes from upload to publish.

If your data is already three columns, row, column and value, this takes about eight minutes, most of it spent getting the colour scale right rather than the upload itself. Add another five if you're pivoting a wide table (weekdays across the top, hours down the side) into that long shape first. Budget the eight minutes below and treat pivoting as a separate, earlier step.

The data you need

Three columns, one row per cell: the row category, the column category, and the numeric value at that intersection. One header row, no pre-shaded formatting.

Sample CSV
DayHourOrders
Monday912
Monday1231
Monday1522
Monday1845
Tuesday915
Tuesday1228
Tuesday1519
Tuesday1852
Wednesday911
Wednesday1224
Wednesday1520
Wednesday1858
Notes

This is long format, not wide format. If your source is a pivot table with days across the top and hours down the side, unpivot it first: one row per cell, not one column per day. Most spreadsheet tools call this "unpivot" or "melt."

A missing combination (say, Wednesday at 21:00 never happened) doesn't need a zero row. Leave it out and PlotSet renders that cell as empty rather than as a false zero, which matters a lot on a colour scale.

Keep the value column numeric only. If a cell has been formatted as a percentage or currency string in the source sheet, strip the symbol before uploading or PlotSet will treat it as text and the colour scale won't compute.

For a correlation matrix, both the row and column categories are the same list of variables. That's normal, the diagonal (each variable against itself) will read as the maximum value, which is expected and fine to leave in.

The steps

The exact click path in PlotSet, from a blank template to a finished chart.

  1. 01

    Open the Heatmap template

    From the PlotSet dashboard, start a new project and choose the Heatmap template. It loads with sample data already bound so you can see the exact three-column shape, row, column, value, before you touch your own file.

    PlotSet's template picker: chart categories listed down the left, the Bar Charts grid open, and the Bar Chart template card showing its Select button.
    Every guide starts here. Pick the category, then the template: it is the same grid whichever chart type you are after.
  2. 02

    Shape your sheet into row, column, value

    One line per cell. If your data currently lives as a wide grid, days across the top as separate columns, unpivot it into this long format first. This is the step people skip and then wonder why the upload doesn't map cleanly.

  3. 03

    Upload your file or connect a sheet

    Use the data panel to import a CSV or .xlsx file, paste rows directly, or connect a Google Sheet if the underlying numbers change on a schedule and you'd rather not re-upload every time.

    The PlotSet editor's data view: a spreadsheet grid with Name, Value and Region columns filled with Canadian province figures, beside the Data panel offering CSV upload, Magic Import and Google Sheet sync.
    The data view, shown here on a bar chart project. Upload a CSV, lift the numbers out of an image with Magic Import, or sync a Google Sheet. The panel is identical for every chart type.
  4. 04

    Map the row, column and value fields

    Tell PlotSet which column feeds the row axis, which feeds the column axis, and which is the numeric value being shaded. Clear headers like "Day", "Hour", "Orders" usually get guessed correctly, but check it when your sheet carries extra columns.

    The PlotSet data panel with the column bindings highlighted: Label/time mapped to column A, Values to column B and Filter/color to column C, with the Auto Binding button below.
    Bindings decide which column becomes the label, which supplies the values and which drives the colour. Auto Binding guesses them from your headers, so check it rather than assume it.
  5. 05

    Choose sequential or diverging

    Sequential (light to dark, one hue) for a quantity that only runs from low to high, like order counts. Diverging (two hues either side of a real midpoint like zero) when some values are above a baseline and some are below it, like a correlation matrix or a change-from-average table.

    The PlotSet editor on the Preview tab: a finished Heatmap on the canvas, with the settings panel outlined in red down the right-hand side.
    The Preview tab for a Heatmap. Every styling control lives in the outlined panel, each on its own tab: appearance, header, footer and the options specific to this chart type.
  6. 06

    Order the rows and columns on purpose

    Switch off alphabetical sorting unless the categories already have a natural order, like weekdays or hours. Sort by row total, or group similar rows next to each other, so the pattern (the hot band, the quiet row) is visible instead of scattered across the grid.

  7. 07

    Turn on cell labels if the grid is small enough

    Under roughly a fifteen by fifteen grid, showing the number inside each cell costs nothing and lets readers get an exact value without hovering. Past that size, leave the cells blank and rely on the tooltip, printed numbers on a dense grid just become noise.

  8. 08

    Publish, embed or export the finished grid

    Publish for a live chart with hover tooltips that show the row, column and exact value, grab the embed code for a page, or export a PNG, SVG or PDF if you need a static image for a deck.

Start from the Heatmap template with sample data already loaded, then swap in your own.

Open the template

Publish, embed or export it

The last stretch is the same for every chart type: Share turns the chart into a live public link and an embed code, Export writes it out as a static file.

Share: public link and embed code

Activating the embed code and public link publishes the chart. The link is safe to send to anyone, and the embed code drops into any page as an iframe that keeps the hover tooltips and the interactivity. Edit the chart later and hit Recreate to push those changes out to both.

The PlotSet editor toolbar with the Share button highlighted, sitting next to the Export button.
Share is how a finished chart becomes a public link and an embed code.
PlotSet's Share dialog: the toggle activating the embed code and public link, buttons for Link, Embed, Facebook, Reddit, Twitter, LinkedIn and Email, and the public chart link with a Copy button.
Switch on the embed code and public link, then copy the link or take the iframe. Recreate pushes later edits out to everyone already holding it.

Export: SVG, PNG or JPG

Export writes a static copy at whatever size you need. SVG stays sharp at any scale and can still be edited in a design tool; PNG and JPG are the safe choices for slides and documents. The scale multiplier is what gets you a crisp image on a retina screen.

The PlotSet editor toolbar with the Export button highlighted.
Export is the route to a static file for a slide or a report.
PlotSet's Export chart dialog: a 2x scale selector, width and height fields set to 1000 by 600, and the open format menu listing SVG, PNG and JPG.
SVG stays sharp at any size and stays editable in a design tool; PNG and JPG are the safe picks for a deck. Set the scale before you export so the image is crisp on a retina screen.

Styling tips for a Heatmap

Set the scale range with an outlier in mind

One unusually large cell, a launch-day spike, a data-entry error, pulls every other cell toward the pale end of the scale and the pattern disappears. Cap the scale manually at a sensible ceiling, or fix the outlier at the source, rather than letting the raw maximum decide the range for you.

Pick a midpoint that means something for diverging scales

Zero for a correlation matrix or a change value, the historical average for a performance grid. An arbitrary midpoint (PlotSet defaulting to the middle of your data's range) will shade cells as "above average" and "below average" relative to nothing in particular.

Cluster rows instead of alphabetizing them

If two rows behave similarly across every column, put them next to each other. Alphabetical order is the single most common reason a heatmap looks like noise when the underlying data actually has a clear block structure.

Avoid the default rainbow if PlotSet offers one

A spectral scale isn't perceptually ordered, so a reader's eye sees hard edges where the data is actually smooth. A single-hue sequential scale, or a proper two-hue diverging scale, reads correctly at a glance and holds up for colour-blind readers.

Common mistakes when making a Heatmap

The whole grid looks nearly one colour

This is almost always one extreme value stretching the scale so far that everything else compresses into a narrow band near the low end. Find the outlier cell, decide whether it's real, and either cap the colour scale's maximum manually or exclude the value.

Upload succeeds but the grid comes out with gaps or extra cells

Check that every row/column combination in your source data is spelled and cased consistently. "Monday" and "monday " (with a trailing space) read as two different rows to PlotSet, which fragments what should be one row into two thin, mostly-empty ones.

A diverging scale makes ordinary values look alarming

If the midpoint got set to the middle of the data range instead of a real baseline like zero, half your unremarkable cells will shade as if they're notably below average. Reset the midpoint to the value that actually matters for your data before publishing.

Learn more about the Heatmap

Not sure the Heatmap is the right choice? See what it is, when to use it and when not to.

About the Heatmap

Heatmap: common questions

Three columns in long format: a row category, a column category, and a numeric value for each combination, one row per cell. A wide pivot table needs to be unpivoted into this shape first. CSV and .xlsx both work, along with a pasted range from any spreadsheet.

Make your Heatmap now

Free to start with 300+ templates. No credit card required.