# Makie surface not working with Observables

**URL:** <https://discourse.julialang.org/t/makie-surface-not-working-with-observables/94786>\
**Category:** General Usage\
**Tags:** plotting, makie, observables\
**Created:** [February 17, 2023, 10:37am UTC](https://discourse.julialang.org/t/makie-surface-not-working-with-observables/94786 "2023-02-17T10:37:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AwesomeQuest](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/awesomequest/32/38910_2.png) [@AwesomeQuest](https://discourse.julialang.org/u/AwesomeQuest)\
**Post date:** [February 17, 2023, 10:37am UTC](https://discourse.julialang.org/t/makie-surface-not-working-with-observables/94786/1 "2023-02-17T10:37:23Z")

</div>

When I make a surface with Observables in Makie

```julia
using GLMakie

sep = Observable(.01)
xlim = Observable(5)
ylim = Observable(10)
x	= @lift(-$xlim:$sep:$xlim)
y	= @lift(-$ylim:$sep:$ylim)
z	= @lift([i*j for i in $x, j in $y])

fig = Figure()
ax = Axis3(fig[1,1])

surface!(ax,z)
fig

```

 ![Screenshot 2023-02-17 103147](https://global.discourse-cdn.com/julialang/original/3X/0/9/09d0c0485d32cb0402f351118ccc25d122071a57.png)

And I change the range  
`julia> xlim[] = 5`

 ![Screenshot 2023-02-17 103233](https://global.discourse-cdn.com/julialang/original/3X/8/b/8b780a4999433fd318e5b8ac768280616dc5cc92.png)

It adds these straight lines from one side to the other.

How can I fix this and why does this happen?
