title: Error when creating animation from graph in Octave
body: <p>I am trying to make an animation from a graph and save the result as GIF or video.</p>
  
  <p>The graph and the animation work well in MATLAB but I cannot save it as GIF.</p>
  
  <p><code>imread</code> gives this error:</p>
  
  <pre><code>Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "- 
  dNOPAUSE" "-sDEVICE=ppmraw" "-dTextAlphaBits=4" "-dG
  raphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "- 
  sOutputFile=C:\Users ...
  </code></pre>
  
  <p>I tried the solution from <a href="https://stackoverflow.com/questions/29493060/creating-animation-with-multiple-plots-octave-matlab">here</a>, but that error pops up.</p>
  
  <p>This is my code:</p>
  
  <pre><code>clear all;
  clc;
  
  for m = 1:10
    n = m.*100;
  
    x  = linspace(0,1500,1500);
    x2 = linspace(n,1000+n,500);
  
    y2 = [((20e-6.*n + 0.008).*(sin(pi/1000.*(x2-n))).^2) ];
  
    y1 = zeros(1,n);
    y3 = zeros(1,1000-n);
    y7 = [y1 y2 y3];
    y8 = y7 + 0;
  
    y1 = (sin(pi/150*x)).^2;
    y3 = exp((x/400)-5);
  
    y5 = (y1.*y3)+y8;
  
    plot( x,y5);
    drawnow;
    #pause(0.01);
  endfor
  
  
  im = imread ("animation.pdf", "Index", "all");
  imwrite (im, "animation.gif", "DelayTime", .5);
  </code></pre>
  
  <p>EDIT:
  This is the complete error. Directory name redacted for privacy.</p>
  
  <pre><code>    Magick: "gswin32c" "-q" "-dBATCH" "-dSAFER" "-dMaxBitmap=50000000" "-dNOPAUSE" "-sDEVICE=ppmraw"
  "-dTextAlphaBits=4" "-dGraphicsAlphaBits=4" "-r72x72" "-dFirstPage=1" "-dLastPage=1" "-sOutputFil
  e=C:\Users\XXXXXXXXXXXXXXXXXXXXXXXXXX" "--" "C:\Users\XXXXXXXXXXXXXXXXXXXXXXXXXX" "-c
  " "quit" [No such file or directory].
  error: Magick++ exception: Magick: Postscript delegate failed (F:\XXXXXXXXXXXXXXXXXXXXXXXXXX\animation.pdf) reported by coders/pdf.c:434 (ReadPDFImage)
  error: called from
      __imread__ at line 78 column 10
      imageIO at line 118 column 26
      imread at line 106 column 30
      test_animation2 at line 6 column 4
  </code></pre>