Menu

Flush plot during loop

Help
2007-04-17
2013-04-25
  • Stephan Paukner

    Stephan Paukner - 2007-04-17

    Hi,

    If I want to plot subsequently during a loop, this works when using gnuplot, but not with octplot. With octplot, I only see the first and last plot in this example:

    > x=-10:10;
    > for p=1:5;
    >     plot(x.^p);
    >     sleep(1);
    > end

    It would be convenient to be able to plot in a video style for illustration. Can I somehow flush the plot to the output for every step?

    Regards

     
    • Shai Ayal

      Shai Ayal - 2007-04-17

      use
      octplot_redraw();

      just before sleep.

      Shai

       
    • Nobody/Anonymous

      You can also try the pause(1); instead of sleep(1);

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.