# Colour next to the label in the legend of a mesh3d in Plots.jl

**URL:** https://discourse.julialang.org/t/colour-next-to-the-label-in-the-legend-of-a-mesh3d-in-plots-jl/120896
**Category:** Visualization
**Tags:** plots
**Created:** [October 4, 2024, 8:15am UTC](https://discourse.julialang.org/t/colour-next-to-the-label-in-the-legend-of-a-mesh3d-in-plots-jl/120896 "2024-10-04T08:15:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Valery](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/valery/32/21803_2.png) [@Valery](https://discourse.julialang.org/u/Valery)
#### Post date: [October 4, 2024, 8:15am UTC](https://discourse.julialang.org/t/colour-next-to-the-label-in-the-legend-of-a-mesh3d-in-plots-jl/120896/1 "2024-10-04T08:15:07Z")

</div>

Why the colour of the surfaces does not appear next to the text label in the legend box when I use the code below ? How to have it appear ?

 ![nocolour](https://global.discourse-cdn.com/julialang/original/3X/6/8/68320df5769a0bff5829986d5c5095544a924759.png)

```julia
x = [0, 0, 0, 0, 1, 1, 1, 1]
y = [0, 0, 1, 1, 0, 0, 1, 1]
z = [0, 1, 0, 1, 0, 1, 0, 1]
sqconnections = [(1,2,4,3),(5,6,8,7),(1,5,6,2),(3,7,8,4),(2,4,8,6),(1,3,7,5)];

Plots.plot(seriestype=:mesh3d, x, y, z,
connections=sqconnections,
linecolor=:black,
labels = "why no colours :(",
show=true)

```

I tried to look for possible series attributes but could not find anything.

---

<div class="post-metadata">

### Author: ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)
#### Post date: [October 4, 2024, 9:33am UTC](https://discourse.julialang.org/t/colour-next-to-the-label-in-the-legend-of-a-mesh3d-in-plots-jl/120896/2 "2024-10-04T09:33:15Z")

</div>

A simple workaround:

```julia
plot(seriestype=:mesh3d, x, y, z,
    connections=sqconnections,
    linecolor=:black, fc=:skyblue,
    labels=""
)

plot!((NaN,0,0), lc=:transparent, fc=:skyblue, marker=:square, labels="Sky blue", widen=false)

```
