# Makie LScene grid always on background

**URL:** <https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995>\
**Category:** General Usage\
**Tags:** makie\
**Created:** [November 29, 2022, 1:57pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995 "2022-11-29T13:57:49Z")\
**Posts on this page:** 9\
**Page:** 1

<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:** [November 29, 2022, 1:57pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/1 "2022-11-29T13:57:49Z")

</div>

In Makie, is it possible to configure an `LScene` so that its grids behave like the ones of an `Axis3` and remain in the _background_ of the plot.  
I largely prefer the looks of the `LScene` grids for most of my plots (involving meshes mostly) but it is really annoying to have 3 faces a bit lost because of the grid overlay.

As an example `plot(rand(10),rand(10),rand(10)` results in (a nice)

 ![image](https://global.discourse-cdn.com/julialang/original/3X/d/6/d6b76abd5ea2e5ff045d821e82008ed80cf18102.png)

After rotating around the Z direction by ~180° I get this (somewhat ugly) result

 ![image](https://global.discourse-cdn.com/julialang/original/3X/f/f/ff80552f2e1002b9d6c9061f4128849af2905f50.png)

While

```julia
f = Figure()
ax = Axis3(f[1,1])
plot!(ax,rand(10),rand(10),rand(10))

```

gives

 ![image](https://global.discourse-cdn.com/julialang/original/3X/5/5/550ed3afbb10a9b5d66e99894fa6e76c2511a22a.png)

and after rotation

 ![image](https://global.discourse-cdn.com/julialang/original/3X/0/e/0e763fb678b6f99d5a39c39aa3b1b2d939f9baaa.png)

---

<div class="post-metadata">

**Author:** ![josuagrw](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/josuagrw/32/1015_2.png) [@josuagrw](https://discourse.julialang.org/u/josuagrw)\
**Post date:** [November 29, 2022, 2:12pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/2 "2022-11-29T14:12:57Z")

</div>

Just out of curiosity: How do you rotate the scene?

---

<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:** [November 29, 2022, 2:13pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/3 "2022-11-29T14:13:42Z")

</div>

At the moment, I do that in `GLMakie`, manually

---

<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:** [November 29, 2022, 2:28pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/4 "2022-11-29T14:28:23Z")

</div>

The LScene grid is super barebones and doesn’t have that capability. But you can change the styling of Axis3 to match it if you want? Or what is it visually that you prefer?

---

<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:** [November 29, 2022, 2:48pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/5 "2022-11-29T14:48:13Z")

</div>

Well, it may be another way to put this indeed. If you have any ideas how to make a `LScene`-lookalike, please share :).

---

<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:** [November 29, 2022, 10:43pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/6 "2022-11-29T22:43:58Z")

</div>

Have you checked the docstring of Axis3 or the theming docs page? There you can check which visual attributes there are and how some of them look

---

<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:** [November 30, 2022, 1:51pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/7 "2022-11-30T13:51:27Z")

</div>

> [@jules](#):
>
> Have you checked the docstring of Axis3

Well, yes, but the main things I am interested in, are the ability to zoom in the plot (as said above, I work with meshes) and to respect the aspect ratio of the objects I am plotting. Both these properties do not seem to be available with `Axis3`, are they ?

---

<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:** [November 30, 2022, 2:05pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/8 "2022-11-30T14:05:10Z")

</div>

aspect ratio yes, zoom no. Aspect ratio can be set via `aspect` like described here [https://docs.makie.org/stable/examples/blocks/axis3/index.html#aspect](https://docs.makie.org/stable/examples/blocks/axis3/index.html#aspect)

---

<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:** [November 30, 2022, 2:13pm UTC](https://discourse.julialang.org/t/makie-lscene-grid-always-on-background/90995/9 "2022-11-30T14:13:26Z")

</div>

I meant aspect ratio in the sense that if you want the plotted axes to fill the plot area, you have to use stretch, which hence does not maintain aspect ratio, but you are right.

The only thing I’m interested in the `Axis3` behavior is the ability to move the grids to the background when appropriate, but sadly I seems to be tied to that block.
