# Makie Unfilled Polygons

**URL:** <https://discourse.julialang.org/t/makie-unfilled-polygons/79440>\
**Category:** Visualization\
**Tags:** plotting, makie\
**Created:** [April 13, 2022, 4:16pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440 "2022-04-13T16:16:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Post date:** [April 13, 2022, 4:16pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440/1 "2022-04-13T16:16:43Z")

</div>

Hi,  
what is the syntax to plot _unfilled_/_empty_ polygons (via `Makie.poly!`) ?

---

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [April 13, 2022, 4:47pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440/2 "2022-04-13T16:47:59Z")

</div>

Isn’t it `wireframe` ?

[https://makie.juliaplots.org/stable/examples/plotting\_functions/wireframe/](https://makie.juliaplots.org/stable/examples/plotting_functions/wireframe/)

---

<div class="post-metadata">

**Author:** ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Post date:** [April 13, 2022, 5:56pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440/3 "2022-04-13T17:56:04Z")

</div>

Thank you for the tip.

AFAIU `wireframe` is a 3D thing and does not correspond to what I am looking for.  
I managed to plot what I wanted using `lines` on closed sets of points separated with `NaN`s.

I.e. moving from something like this :

```julia
for r ∈ rectangles
    xm,ym,xM,yM=r.xmin,r.ymin,r.xmax,r.ymax
    push!(polygons,Polygon([Point2f(p) for p ∈ ((xm,ym),(xM,ym),(xM,yM),(xm,yM))]))
end
poly!(ax,polygons,color = pcolors,strokewidth = 0.5)

```

to something like this :

```julia
xs = Vector{Float64}()
ys = Vector{Float64}()
for r ∈ rectangles
    xm,ym,xM,yM=r.xmin,r.ymin,r.xmax,r.ymax
    append!(xs,[xm,xM,xM,xm,xm,NaN])
    append!(ys,[ym,ym,yM,yM,ym,NaN])
end
lines!(ax,xs,ys,linewidth = 0.1,color=:white)
end

```

I wish a keyword like `fill=true/false` exists for `poly` but could not find it…

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://discourse.julialang.org/u/jules)\
**Post date:** [April 13, 2022, 8:41pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440/4 "2022-04-13T20:41:58Z")

</div>

Could also just set `color = :transparent` on the polys

---

<div class="post-metadata">

**Author:** ![LaurentPlagne](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laurentplagne/32/10103_2.png) [@LaurentPlagne](https://discourse.julialang.org/u/LaurentPlagne)\
**Post date:** [April 13, 2022, 9:10pm UTC](https://discourse.julialang.org/t/makie-unfilled-polygons/79440/5 "2022-04-13T21:10:17Z")

</div>

Ach… Thank you ! I was not able to find this through the docs.
