# Spatial Heatmap

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-e0c17006e3fc8c658b7d6d25b6af984a25448c7f%2FSpatial_Heatmap.png?alt=media)

![](https://894783789-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-LPHXQ1I3gb93zpLrLZf%2Fuploads%2Fgit-blob-724b1957d63eea714016f2bff36705f4b3becb54%2FSpatial_Heatmap.png?alt=media) - [\[source code\]](https://github.com/ladybug-tools/ladybug-grasshopper/blob/master/ladybug_grasshopper/src/LB%20Spatial%20Heatmap.py)

Color a mesh as a heatmap using values that align with the mesh faces or vertices.

Note that any brep can be converted to a gridded mesh that can be consumed by this component using the "LB Generate Point Grid" component.

### Inputs

* **values \[Required]**

A list of numerical values with which to color the mesh. The number of values must match the number of faces or vertices in the mesh.

* **mesh \[Required]**

A Mesh object, with a number of faces or vertices that match the number of input values and will be colored with results.

* **offset\_dom**

Optional domain (or number for distance), which will be used to offset the mesh faces or verticesto according to the values. Higher values will be offset further.

* **legend\_par**

Optional legend parameters from the Ladybug 'Legend Parameters' component.

* **legend\_title**

A text string for Legend title. Typically, the units of the data are used here but the type of data might also be used. Default is an empty string.

* **global\_title**

A text string to label the entire mesh. It will be displayed in the lower left of the result mesh. Default is for no title.

### Outputs

* **mesh**

The input \_mesh that has been colored with results.

* **legend**

Geometry representing the legend for the mesh.

* **title**

A text object for the global\_title.

* **colors**

The colors associated with each input value.

* **legend\_par**

The input legend parameters with defaults filled for unset properties.

* **vis\_set**

A VisualizationSet object for drawing a detailed version of the heatmap in the Rhino scene. This can be connected to the "LB Preview Visualization Set" component to display this version of the heatmap in Rhino.
