Created
September 22, 2018 13:47
-
-
Save jaakkor2/4e618ea940c6a1ec2fff6c92b291fc15 to your computer and use it in GitHub Desktop.
Works if pasted to REPL, not if included from file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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