Skip to content
Plotly templates

Correlation Heatmap (Plotly)

A correlation matrix rendered as a heatmap.

Template previewPlotly
Rendering…

Make it your own.

{
  "data": [
    {
      "type": "heatmap",
      "z": [[1.0, 0.8, 0.3, -0.2], [0.8, 1.0, 0.4, -0.1], [0.3, 0.4, 1.0, 0.6], [-0.2, -0.1, 0.6, 1.0]],
      "x": ["A", "B", "C", "D"],
      "y": ["A", "B", "C", "D"],
      "colorscale": "RdBu",
      "zmid": 0
    }
  ],
  "layout": {"title": "Correlation matrix"}
}