Replies: 1 comment
-
|
You should use Observables to directly mutate the contents of the image! The full docs can be found here, but some basic "pseudo" code is as follows: f = Figure()
ax = Axis(fig[1, 1])
btn = Button(fig[2, 1]; tellwidth = false)
img_obs = Observable(rand(RGBAf, 10, 10))
img_plot = image!(ax, img_obs)
btn = Button(...)
on(btn.clicks) do n_clicks # triggers every time the button is pressed
# next_image() must return a Matrix{RGBAf}
img_obs[] = next_image() # update the input to `image!`
end |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a grid with parameters and a button to generate an image. After an image is created and the user changes a parameter and clicks on the bottom again, I want to delete the old image and display the new one, how can I do that?
I already tried to
delete!(figure, image_display)followed by a new call toimage(figure[place], image), but that doesn't work for me, giving me the following:Beta Was this translation helpful? Give feedback.
All reactions