# Makie.jl v0.16.1 - How to manually set limits for 3D LScene?

**URL:** <https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651>\
**Category:** Visualization\
**Tags:** makie\
**Created:** [January 15, 2022, 2:18am UTC](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651 "2022-01-15T02:18:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![jshahbazi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jshahbazi/32/31888_2.png) [@jshahbazi](https://discourse.julialang.org/u/jshahbazi)\
**Post date:** [January 15, 2022, 2:18am UTC](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651/1 "2022-01-15T02:18:02Z")

</div>

In v0.15.x, I could manually set the limits for a 3D LScene via `xlims!(lscene.scene, (0, 10))`, but in v0.16 that ability is no longer available. It seems to involve using an Axis3, but I’m not sure how to combine an Axis3 and an LScene. Is there a function that will do this, or do I have to stop using LScenes?

---

<div class="post-metadata">

**Author:** ![jpdoane](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@jpdoane](https://discourse.julialang.org/u/jpdoane)\
**Post date:** [February 23, 2023, 3:48pm UTC](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651/2 "2023-02-23T15:48:39Z")

</div>

Bumping this - Im also very interested in this answer and hopelessly confused about the relationship between 3D LScene and Axis3.

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [June 22, 2024, 3:46am UTC](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651/3 "2024-06-22T03:46:15Z")

</div>

I thought it was strange I couldn’t find the answer to this in the documentation, but it doesn’t seem to be answered here either.

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [June 22, 2024, 2:16pm UTC](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651/4 "2024-06-22T14:16:35Z")

</div>

Okay, in case the google demi-gods bring you here or ChatGPT needs a new lesson. This doesn’t manually set the limits, but it does force an update. I don’t know why it isn’t in the Makie documentation and examples, but I read through the source code and found it.

reset\_limits!(::LScene).

So if you did something like

```julia
f=Figure()
ax=LScene(f[1,1],show_axis=true);

x = Observable(something being plotted)
...

on(x) do x_prime
   reset_limits!(ax)
end

```

So if you do something like  
`x[]=x[].*2`

You get a new axis drawn.

---

<div class="post-metadata">

**Author:** ![Allan\_Baker](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/allan_baker/32/42645_2.png) [@Allan\_Baker](https://discourse.julialang.org/u/Allan_Baker)\
**Post date:** [June 22, 2024, 2:20pm UTC](https://discourse.julialang.org/t/makie-jl-v0-16-1-how-to-manually-set-limits-for-3d-lscene/74651/5 "2024-06-22T14:20:11Z")

</div>

But to do it manually, it looks like you need to modify what is in:

```julia
function reset_limits!(lscene::LScene)
    notify(lscene.scene.theme.limits)
    center!(lscene.scene)
    return
end

```

If it is set to `automatic` it calculates it otherwise it uses what is in those limits.

> <https://github.com/MakieOrg/Makie.jl/blob/master/src/makielayout/blocks/scene.jl>
