fix animate for import Plots
This commit is contained in:
parent
7498b3c769
commit
cb577f0ef3
@ -163,7 +163,7 @@ function _animate(forloop::Expr, args...; callgif = false)
|
|||||||
error("Unsupported animate filter: $args")
|
error("Unsupported animate filter: $args")
|
||||||
end
|
end
|
||||||
|
|
||||||
push!(block.args, :(if $filterexpr; frame($animsym); end))
|
push!(block.args, :(if $filterexpr; Plots.frame($animsym); end))
|
||||||
push!(block.args, :(global $countersym += 1))
|
push!(block.args, :(global $countersym += 1))
|
||||||
|
|
||||||
# add a final call to `gif(anim)`?
|
# add a final call to `gif(anim)`?
|
||||||
@ -172,7 +172,7 @@ function _animate(forloop::Expr, args...; callgif = false)
|
|||||||
# full expression:
|
# full expression:
|
||||||
esc(quote
|
esc(quote
|
||||||
$freqassert # if filtering, check frequency is an Integer > 0
|
$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
|
global $countersym = 1 # init iteration counter
|
||||||
$forloop # for loop, saving a frame after each iteration
|
$forloop # for loop, saving a frame after each iteration
|
||||||
$retval # return the animation object, or the gif
|
$retval # return the animation object, or the gif
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user