# Put a heatmap into a mesh face

**URL:** <https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746>\
**Category:** Visualization\
**Tags:** question, plotting, makie\
**Created:** [February 21, 2021, 10:54pm UTC](https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746 "2021-02-21T22:54:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [February 21, 2021, 10:54pm UTC](https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746/1 "2021-02-21T22:54:14Z")

</div>

The mesh function seems to be pretty fast, is there a way to include a heatmap like in the following example. Eventually I would like to have all faces with different colormaps. Any suggestions are welcome.

![plane](https://global.discourse-cdn.com/julialang/original/3X/3/0/30c1412f9a20e6b6da4c6abbe29581bcabf480cc.png)

```julia
using GLMakie
using GeometryBasics
cube = FRect3D(Vec3f0(0) .+ Vec3f0(0, 0, 0), Vec3f0(1))
points = decompose(Point3f0, cube)
caras = decompose(GLTriangleFace, cube)
mesh(points[1:8], caras[1:2], color = rand(8), colormap = :plasma,
 transparency = true)

```

---

<div class="post-metadata">

**Author:** ![sunbubble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sunbubble/32/22022_2.png) [@sunbubble](https://discourse.julialang.org/u/sunbubble)\
**Post date:** [February 22, 2021, 8:51am UTC](https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746/2 "2021-02-22T08:51:50Z")

</div>

My guess is that you need to have separate plot calls for each face with its own colormap.

---

<div class="post-metadata">

**Author:** ![lazarusA](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lazarusa/32/6571_2.png) [@lazarusA](https://discourse.julialang.org/u/lazarusA)\
**Post date:** [February 22, 2021, 1:20pm UTC](https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746/3 "2021-02-22T13:20:30Z")

</div>

Indeed, I coded a work around. It does what I want, I will polish the code and afterwards I will upload my solution 😃

 ![cube](https://global.discourse-cdn.com/julialang/original/3X/1/b/1bd7a0ecb5a9b7bc366297bcc97c799f9fe5236b.png)

---

<div class="post-metadata">

**Author:** ![sunbubble](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sunbubble/32/22022_2.png) [@sunbubble](https://discourse.julialang.org/u/sunbubble)\
**Post date:** [February 22, 2021, 2:41pm UTC](https://discourse.julialang.org/t/put-a-heatmap-into-a-mesh-face/55746/4 "2021-02-22T14:41:11Z")

</div>

Looks fancy! Are you doing any explicit back-face culling because of the transparency?
