# Filling Areas to Complete a ColorMap

**URL:** <https://discourse.julialang.org/t/filling-areas-to-complete-a-colormap/59851>\
**Category:** Visualization\
**Created:** [April 23, 2021, 8:45am UTC](https://discourse.julialang.org/t/filling-areas-to-complete-a-colormap/59851 "2021-04-23T08:45:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![p.sms](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@p.sms](https://discourse.julialang.org/u/p.sms)\
**Post date:** [April 23, 2021, 8:45am UTC](https://discourse.julialang.org/t/filling-areas-to-complete-a-colormap/59851/1 "2021-04-23T08:45:41Z")

</div>

Hello People,  
I am rather new to Julia so I would be very thankful if someone was able to help or guide me, I am trying to plot a 2D grid of 126 3-nodes triangular finite elements with color representing a main strain.  
I have the CSVDataMatrix with the coordinates of the 80 nodes’ xy coordinates in the third and fourth column, another 3\*126 matrix with the connectivity of the nodes called Conectivity, and an array with the 126 strains relative to each element. So I wanted to paint each element in a range of colors depending the value of said straing, but, as every datta is discrete, I havent been able to properly use heatmap().

**Thanks in advance.**

```julia
SecondPlot=plot()
framenum=10

for i=1:Num_Ele
global SecondPlot
SecondPlot=plot!(CSVDataMatrix[Connectivity[i,:],3,framenum],CSVDataMatrix[Connectivity[i,:],4,framenum])
end

SecondPlot=plot!(CSVDataMatrix[1:Col_Points,3,framenum],CSVDataMatrix[1:Col_Points,4,framenum]) #upper line plot
SecondPlot=plot!(CSVDataMatrix[1:10:71,3,framenum],CSVDataMatrix[1:10:71,4,framenum]) #ending points 
SecondPlot=scatter!(CSVDataMatrix[:,3,framenum],CSVDataMatrix[:,4,framenum],legend=false) #wanted to see the points aswell

display(SecondPlot)

```

![plotejemplo2](https://global.discourse-cdn.com/julialang/original/3X/c/9/c955f3521a03008e39c0a4639c7898d97a8e9dd8.png)

---

<div class="post-metadata">

**Author:** ![briochemc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/briochemc/32/4209_2.png) [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Post date:** [April 23, 2021, 12:08pm UTC](https://discourse.julialang.org/t/filling-areas-to-complete-a-colormap/59851/2 "2021-04-23T12:08:15Z")

</div>

I’m having a hard time understanding what you’re after… Could you bake a runnable minimal example that we can copy-paste and run along with a clear explanation of what is not working for you and what you would want? (Maybe drawing a sketch can help?)

---

<div class="post-metadata">

**Author:** ![p.sms](https://avatars.discourse-cdn.com/v4/letter/p/82dd89/32.png) [@p.sms](https://discourse.julialang.org/u/p.sms)\
**Post date:** [April 23, 2021, 2:58pm UTC](https://discourse.julialang.org/t/filling-areas-to-complete-a-colormap/59851/3 "2021-04-23T14:58:06Z")

</div>

Yeah, sorry, I would like to colour each triangle of the previous mesh depending of the value of the stretch , as you can see, I have already plotted the mesh but cant figure a way to fill the area of each traingle with its correspondant color.

This is an non relevant example, but something like this:

 ![image5](https://global.discourse-cdn.com/julialang/original/3X/2/c/2c258f852abd40c1defb85b6c3164dee293f6005.jpeg)

---

<div class="post-metadata">

**Author:** ![briochemc](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/briochemc/32/4209_2.png) [@briochemc](https://discourse.julialang.org/u/briochemc)\
**Post date:** [April 24, 2021, 5:39am UTC](https://discourse.julialang.org/t/filling-areas-to-complete-a-colormap/59851/4 "2021-04-24T05:39:28Z")

</div>

I don’t think `heatmap`, `contourf`, `surface`, and so on, support unstructured meshes at this stage. But maybe you could use an extra package like [TriplotRecipes.jl](https://github.com/pazner/TriplotRecipes.jl)?

Also Makie.jl hopefully will handle this at some point (see, e.g., [issue #748](https://github.com/JuliaPlots/Makie.jl/issues/748))?
