# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ladybug.tools/ladybug-primer/components/4_extra/spatial_heatmap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
