Skip to content

Instantly share code, notes, and snippets.

@jaakkor2
Created September 22, 2018 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaakkor2/4e618ea940c6a1ec2fff6c92b291fc15 to your computer and use it in GitHub Desktop.
Save jaakkor2/4e618ea940c6a1ec2fff6c92b291fc15 to your computer and use it in GitHub Desktop.
Works if pasted to REPL, not if included from file
using Makie
function heart()
scene = scatter([0], [0], marker = '❤', markersize = 0.5, color = :red, raw = true)
end
function heart_update(scene)
s = scene[end] # last plot in scene
i = 0
println(isopen(scene))
@async while isopen(scene)
i += 1
s[:markersize] = (cos(i) + 1) / 4 + 0.2
sleep(0.1)
end
end
scene = heart()
heart_update(scene)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment