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.

Unos 8 minutos

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.

Los datos que necesitas

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.

CSV de ejemplo
DayHourOrders
Monday912
Monday1231
Monday1522
Monday1845
Tuesday915
Tuesday1228
Tuesday1519
Tuesday1852
Wednesday911
Wednesday1224
Wednesday1520
Wednesday1858
Notas

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.

Los pasos

El camino exacto en PlotSet, desde una plantilla en blanco hasta el gráfico terminado.

  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.

    El selector de plantillas de PlotSet: las categorías de gráficos en la columna izquierda, la cuadrícula Bar Charts abierta y la tarjeta de la plantilla Bar Chart con su botón Select visible.
    Todas las guías empiezan aquí. Elige la categoría y luego la plantilla. Es la misma cuadrícula sea cual sea el tipo de gráfico que busques.
  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.

    La vista de datos del editor de PlotSet: una hoja de cálculo con las columnas Name, Value y Region llenas de cifras de provincias canadienses, junto al panel Data, que ofrece subida de CSV, Magic Import y sincronización con Google Sheet.
    La vista de datos, aquí en un proyecto de gráfico de barras. Sube un CSV, saca los números de una imagen con Magic Import o sincroniza una Google Sheet. El panel es el mismo en todos los tipos de gráfico.
  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.

    El panel de datos de PlotSet con las asignaciones de columnas resaltadas: Label/time apuntando a la columna A, Values a la columna B y Filter/color a la columna C, con el botón Auto Binding debajo.
    Las asignaciones deciden qué columna se convierte en la etiqueta, cuál aporta los valores y cuál define el color. Auto Binding las deduce de tus encabezados, así que revísalas en lugar de darlas por buenas.
  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.

    El editor de PlotSet en la pestaña Preview: un gráfico de tipo Heatmap ya terminado en el lienzo y, a la derecha, el panel de ajustes rodeado por un recuadro rojo.
    La pestaña Preview de un gráfico de tipo Heatmap. Todos los controles de estilo están en el panel enmarcado: apariencia, encabezado, pie de página y las opciones propias de este tipo de gráfico, cada grupo en su propia pestaña.
  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.

Empieza con la plantilla de Heatmap, que ya trae datos de ejemplo cargados, y sustitúyelos por los tuyos.

Abrir la plantilla

Publícalo, incrústalo o expórtalo

El último tramo es igual en todos los tipos de gráfico: Share convierte el gráfico en un enlace público en vivo y un código de incrustación, y Export lo guarda como un archivo estático.

Share: enlace público y código de incrustación

Al activar el código de incrustación y el enlace público, el gráfico queda publicado. El enlace se lo puedes enviar a cualquiera sin problema, y el código de incrustación se coloca en cualquier página como un iframe que conserva los tooltips al pasar el cursor y toda la interactividad. Si editas el gráfico más adelante, haz clic en Recreate para llevar esos cambios a ambos.

La barra de herramientas del editor de PlotSet con el botón Share resaltado, justo al lado del botón Export.
Share es lo que convierte un gráfico terminado en un enlace público y un código de incrustación.
El diálogo Share de PlotSet: el interruptor que activa el código de incrustación y el enlace público, los botones Link, Embed, Facebook, Reddit, Twitter, LinkedIn y Email, y el enlace público del gráfico con un botón Copy.
Activa el código de incrustación y el enlace público, y después copia el enlace o llévate el iframe. Recreate envía las ediciones posteriores a todos los que ya lo tengan.

Export: SVG, PNG o JPG

Export guarda una copia estática en el tamaño que necesites. El SVG se mantiene nítido a cualquier escala y se puede seguir editando en una herramienta de diseño; PNG y JPG son la opción segura para diapositivas y documentos. El multiplicador de escala es lo que te da una imagen nítida en una pantalla retina.

La barra de herramientas del editor de PlotSet con el botón Export resaltado.
Export es el camino hacia un archivo estático para una diapositiva o un informe.
El diálogo Export chart de PlotSet: un selector de escala en 2x, los campos de ancho y alto fijados en 1000 por 600, y el menú de formato abierto con SVG, PNG y JPG.
El SVG se mantiene nítido a cualquier tamaño y se puede seguir editando en una herramienta de diseño; PNG y JPG son la apuesta segura para una presentación. Ajusta la escala antes de exportar para que la imagen se vea nítida en una pantalla retina.

Consejos de estilo para un 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.

Errores comunes al hacer un 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.

Aprende más sobre el Heatmap

¿No estás seguro de que el Heatmap sea la opción correcta? Descubre qué es, cuándo usarlo y cuándo no.

Sobre el Heatmap

Heatmap: preguntas frecuentes

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.

Crea tu Heatmap ahora

Gratis para empezar con más de 300 plantillas. No se necesita tarjeta de crédito.