PGFPlots.jl icon indicating copy to clipboard operation
PGFPlots.jl copied to clipboard

Reel Support

Open tawheeler opened this issue 8 years ago • 6 comments

Reel.jl lets you string frames together into videos (or gifs, etc.) I figured out how to use it with PGFPlots, but it requires setting (a very small number of) things to get it to work:

using PGFPlots
using Reel
Reel.set_output_type("gif") // I use this - may not strictly be required
Reel.extension(m::MIME"image/svg+xml") = "svg"

frames = Frames(MIME("image/svg+xml"), fps=10)
for frame in 1:10

    t = rad2deg(linspace(0,5pi,60))
    x = sind(t)
    y = cosd(t)
    z = 2t/(5pi)
    p = Plots.Linear3(x, y, z, mark="none")
    view=@sprintf("{%f}{30}", rad2deg(frame*0.1))

    ax = Axis(p, view=view, xlabel="x", ylabel="y", zlabel="z")

    push!(frames, ax)
end 
frames

Would we like to support this directly? Should we just add an example to the docs without supporting it directly?

tawheeler avatar Apr 26 '16 21:04 tawheeler

I would love for this to be supported directly! Lots of people want animated plots! It would be nice to make the interface for doing this really slick.

mykelk avatar Apr 27 '16 04:04 mykelk

So it looks like we only need:

  1. to include Reel
  2. add Reel.extension(m::MIME"image/svg+xml") = "svg"
  3. add some method for getting a Frames object with the desired MIME.
  4. maybe reexport Reel
  5. document some examples

The rest is handled by Reel.

tawheeler avatar Apr 29 '16 20:04 tawheeler

Would like to pull this in, but Reel hasn't issued a new tag in ages.

tawheeler avatar Oct 19 '16 12:10 tawheeler

I asked to be made a collaborator on https://github.com/shashi/Reel.jl/issues/11.

tawheeler avatar Oct 20 '16 08:10 tawheeler

See 1263193

tawheeler avatar Oct 25 '16 15:10 tawheeler

I would say that better than Reel.jl is the gif interface of Plots.jl: https://juliaplots.github.io/ Scroll down a little to see the first example with the Lorenz Attractor.

More documentation is available here.

juliohm avatar Aug 19 '17 18:08 juliohm