Can't create animations

plotting

#1

Hi guys, when I try the code from home page of plots:

initialize the attractor

n = 1500
dt = 0.02
σ, ρ, β = 10., 28., 8/3
x, y, z = 1., 1., 1.

initialize a 3D plot with 1 empty series

plt = path3d(1, xlim=(-25,25), ylim=(-25,25), zlim=(0,50),
xlab = “x”, ylab = “y”, zlab = “z”,
title = “Lorenz Attractor”, marker = 1)

build an animated gif, saving every 10th frame

@gif for i=1:n
dx = σ*(y - x) ; x += dt * dx
dy = x*(ρ - z) - y ; y += dt * dy
dz = xy - βz ; z += dt * dz
push!(plt, x, y, z)
end every 10

nothing happens except the plot initialization. More precisely, it pushes only the first datapoint in the plot and then stops working (but it does not draw it).
When I try simpler code like this,
anim = @animate for i = 1:10
plot(u -> sin(iπu), 0, 10)
end
the same happens.

I am using newest Atom, Julia and all packages are updated. The backend is plotlyJS.


#2

Hi @Robert_Toth! Not sure why your plots won’t display, but please due take a look at this short explanation on how to quote code in Discourse. It’ll make your post a lot easier to read.


#3

Maybe you need to install ffmpeg on your computer for this to work?


#4

This is true for any gif creation in the Plots.jl package.