title: How to animate changing histogram in Plots.jl?
body: <p>I'm working from the <a href="https://juliaplots.github.io/" rel="nofollow noreferrer">following example</a> and failing miserably</p>
  
  <pre><code># 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 = x*y - β*z     ; z += dt * dz
      push!(plt, x, y, z)
  end every 10
  </code></pre>
  
  <p>I have simulations in which I want to calculate and plot a histogram every so often, and then animate all those histograms. This is what I have so far as a toy example:</p>
  
  <pre><code>using Distributions
  using Plots
  Plots.gr()
  
  p = rand(Normal(0,1), 10000)
  myplot = Plots. histogram(p)
  savefig("initial.png")
  
  anim = @animate for i=1:10
      p = rand(Normal(0,1), 10000)
      push!(myplot, Plots.histogram(p))
  end
  
  gif(anim, "mygif.gif", fps = 1)
  </code></pre>
  
  <p>As you can probably tell, I don't really get how this @animate thing works and am just guessing at the syntax here. I know that I could save a bunch of PNGs and later animate, but I want to try it this way. </p>