You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed if you don't use using Plots but only import Plots, then using @Plots.animate results in
UndefVarError: Animation not defined
Stacktrace:
[1] top-level scope at /home/mofef/.julia/packages/Plots/h3o4c/src/animation.jl:167
[2] top-level scope at In[50]:4
I'm new to Julia and I figured that using is much more commonly used than import. Though as far as I understand, both should work...? (I prefer import while learning because it lets me keep track of where something is coming from)
The text was updated successfully, but these errors were encountered:
This issue seems still not fully resolved. Here is my MWE:
using Plots: plot, @animate
anim =@animatefor i in1:2plot(rand(5))
end
From a user point of view, this code should work because it has specified all of the methods from Plots that appear to be used (plot and @animate).
But the code fails with the error ERROR: LoadError: UndefVarError: Plots not defined
The work around is to add import Plots to the user code, but it would be more user friendly if the import Plots was built into the @animate macro.
Is it possible to have an import statement with a macro?
If so, I could make a PR.
If not, then the @animate documentation should instruct the user to do import Plots before using it.
Hi,
I noticed if you don't use
using Plots
but onlyimport Plots
, then using@Plots.animate
results inI'm new to Julia and I figured that
using
is much more commonly used thanimport
. Though as far as I understand, both should work...? (I preferimport
while learning because it lets me keep track of where something is coming from)The text was updated successfully, but these errors were encountered: