Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive plot title #228

Open
tuncbkose opened this issue May 23, 2024 · 0 comments
Open

Interactive plot title #228

tuncbkose opened this issue May 23, 2024 · 0 comments

Comments

@tuncbkose
Copy link

Hi, I'm trying to use Bonito.record_states to plot the evolution of some algorithm, and I cannot get the plot title to change with an Observable (on Firefox, if that matters). I'd appreciate if someone could let me know if I'm doing something wrong or if there indeed is some bug etc.

As a simplified example, consider

using WGLMakie, Bonito

App() do session::Session
    n=10
    slider = Slider(1:n)
    lab = @lift(string("t=", $(slider.value)))
    fig, ax, splot = scatter(1:n, 1:n, axis=(title=lab, ))
    return Bonito.record_states(session, DOM.div(slider, slider.value, fig))
end

When I ran the above, the plot title is stuck at t=1, even though I can add the rest of my code and change the content of the plot as expected. I imagine this may be more WGLMakie related rather than Bonito, but in trying to do a similar thing to create a gif, I had no problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant