From cb577f0ef3d067e9630c6d1508404bbf6aec2fb3 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 16 Feb 2020 09:52:55 +0100 Subject: [PATCH 1/2] fix animate for `import Plots` --- src/animation.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/animation.jl b/src/animation.jl index 7e5f9a8e0..137c60aab 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -163,7 +163,7 @@ function _animate(forloop::Expr, args...; callgif = false) error("Unsupported animate filter: $args") end - push!(block.args, :(if $filterexpr; frame($animsym); end)) + push!(block.args, :(if $filterexpr; Plots.frame($animsym); end)) push!(block.args, :(global $countersym += 1)) # add a final call to `gif(anim)`? @@ -172,7 +172,7 @@ function _animate(forloop::Expr, args...; callgif = false) # full expression: esc(quote $freqassert # if filtering, check frequency is an Integer > 0 - $animsym = Animation() # init animation object + $animsym = Plots.Animation() # init animation object global $countersym = 1 # init iteration counter $forloop # for loop, saving a frame after each iteration $retval # return the animation object, or the gif From 4e5b1aa6e5e1296daa9d1f427a5605c80fb5e6f4 Mon Sep 17 00:00:00 2001 From: Daniel Schwabeneder Date: Sun, 16 Feb 2020 09:55:57 +0100 Subject: [PATCH 2/2] add missing Plots. --- src/animation.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/animation.jl b/src/animation.jl index 137c60aab..e0a12d9f0 100644 --- a/src/animation.jl +++ b/src/animation.jl @@ -167,7 +167,7 @@ function _animate(forloop::Expr, args...; callgif = false) push!(block.args, :(global $countersym += 1)) # add a final call to `gif(anim)`? - retval = callgif ? :(gif($animsym)) : animsym + retval = callgif ? :(Plots.gif($animsym)) : animsym # full expression: esc(quote