# Makie not updating scene in Jupyter

**URL:** <https://discourse.julialang.org/t/makie-not-updating-scene-in-jupyter/48179>\
**Category:** Visualization\
**Created:** [October 11, 2020, 8:03pm UTC](https://discourse.julialang.org/t/makie-not-updating-scene-in-jupyter/48179 "2020-10-11T20:03:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [October 11, 2020, 8:03pm UTC](https://discourse.julialang.org/t/makie-not-updating-scene-in-jupyter/48179/1 "2020-10-11T20:03:17Z")

</div>

I want to update a plot in Jupyter notebook by clicking a button. I’m using Makie and Interact. Here is a minimal example:

```julia
using Makie, AbstractPlotting, WGLMakie
using Interact

t=0:1e-3:1
y1 = sin.(2pi*10*t).*exp.(-t/0.1)
y2 = cos.(2pi*10*t).*exp.(-t/0.15)

scene = Scene(resolution = (500, 500))
lines!(scene, t, y1, scale_plot = true, color = :red, linestyle = :dash)
lines!(scene, t, y2, scale_plot = true, color = :blue, linestyle = :dashdotdot)

bt = Interact.button("Plot")

function update_plot(x)
    y2 = randn(1001)
    scene[2][1].val .= Point2f0.(t,y2);
    
    axis = scene[Axis]
    axis[:names, :axisnames] = ("t", "Yvalues")
    AbstractPlotting.update_limits!(scene)
    AbstractPlotting.update!(scene)
end

display(scene)

on(update_plot, bt)
display(bt)

```

The Ylabel is updated when I click the button, but the plot itself is not. If I run `display(scene)` in a separate cell the plot is shown updated, but I would like to avoid duplicating the scene(the plot will actually be updated hundreds of times by the user via button click. What am I doing wrong? Thank you!
