# Makie depth order sorting

**URL:** <https://discourse.julialang.org/t/makie-depth-order-sorting/56103>\
**Category:** Visualization\
**Tags:** question, plotting, makie\
**Created:** [February 26, 2021, 4:58pm UTC](https://discourse.julialang.org/t/makie-depth-order-sorting/56103 "2021-02-26T16:58:00Z")\
**Posts on this page:** 3\
**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 26, 2021, 4:58pm UTC](https://discourse.julialang.org/t/makie-depth-order-sorting/56103/1 "2021-02-26T16:58:00Z")

</div>

Hello,  
I’m currently plotting several transparent surfaces in a LScene in order to get the appropriate depth order I need to plot them in a specific order, lets say for two surfaces, one in the back and one in the front, first I plot the one in the back and then the one in the front and it seems to work. The question:

is there some function in Makie to enforce or automatically get this behavior. In [Gnuplot.jl](https://lazarusa.github.io/gnuplot-examples/menu3/#depth_sorting) one can control all this with

```julia
"set pm3d depthorder", "set pm3d scansforward", and "set pm3d scansbackward"

```

---

<div class="post-metadata">

**Author:** ![ffreyer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffreyer/32/21569_2.png) [@ffreyer](https://discourse.julialang.org/u/ffreyer)\
**Post date:** [February 26, 2021, 5:15pm UTC](https://discourse.julialang.org/t/makie-depth-order-sorting/56103/2 "2021-02-26T17:15:18Z")

</div>

No. Some attributes affect render order, but there is no way specify how GLMakie iterates through plots. (It’s `ssao = fxaa = true` before `ssao = false; fxaa=true` before `fxaa = false`, which won’t help you. There’s also `overdraw` which disables depth testing.)

---

<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 26, 2021, 5:18pm UTC](https://discourse.julialang.org/t/makie-depth-order-sorting/56103/3 "2021-02-26T17:18:59Z")

</div>

Got it. Thanks 😃
