# JSServe Slider to Vary Number of Points

**URL:** <https://discourse.julialang.org/t/jsserve-slider-to-vary-number-of-points/103859>\
**Category:** General Usage\
**Tags:** pluto, wglmakie\
**Created:** [September 14, 2023, 4:57pm UTC](https://discourse.julialang.org/t/jsserve-slider-to-vary-number-of-points/103859 "2023-09-14T16:57:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ian\_L](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ian_l/32/49509_2.png) [@Ian\_L](https://discourse.julialang.org/u/Ian_L)\
**Post date:** [September 14, 2023, 4:57pm UTC](https://discourse.julialang.org/t/jsserve-slider-to-vary-number-of-points/103859/1 "2023-09-14T16:57:49Z")

</div>

Hi. I’m working with Makie and Pluto. To demonstrate how a plot varies as a parameter is changed, I originally used Pluto’s Slider to modify the parameter. This was fine but wasn’t snappy as Pluto generated each plot from scratch. Taking advice from [WGLMakie support · Issue #155 · fonsp/Pluto.jl · GitHub](https://github.com/fonsp/Pluto.jl/issues/155#issuecomment-669323378), I tried the following:

```julia
App() do session
    slider = JSServe.Slider(1:5)
    n = slider.value.val
    fig = scatter(rand(n))
    return DOM.div(slider.value, slider, fig)
end

```

Unfortunately, this does not modify the number of points. Any suggestions?
