help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

multiplot strangeness


From: E. Joshua Rigler
Subject: multiplot strangeness
Date: 09 Jun 2003 11:09:34 -0600

I've written a recursive state estimation routine (basically a modified
Kalman filter), and with each iteration I wish to plot the state
variables at that moment in time.  I first tried using something like:


   for i=1:t_last

      ...

      multiplot (3, 2)

      for k=1:2
        for l=1:3  
          grid ("on");
          mplot (lags, theta_tmp ( k+(l-1)*2:3*2:length(theta_tmp)),';;-' );
        endfor
      endfor

   endfor


This was OK, but since it cleared the multiplot screen each iteration,
there was a lot of flickering.  So I tried forcing it to NOT reset the
multiplot mode each iteration, but rather use the mplot command after
clearing the individual sub-window:


   for i=1:t_last

      ...

      if (i == 1)
        multiplot (3, 2)
      endif

      for k=1:2
        for l=1:3  
          clearplot;
          grid ("on");
          mplot (lags, theta_tmp ( k+(l-1)*2:3*2:length(theta_tmp)),';;-' );
        endfor
      endfor

   endfor


The result was what I wanted for the first dozen or so iterations (i.e.
i=1:~12).  Very quickly though, each iteration took longer and longer
for Gnuplot to draw each of the subwindows.  By around i=~30 or so, it
was unusable.  This particular example contained 6 subwindows in a 2-row
by 3-column configuration.  Each subwindow was plotting only 16 data
points (the state is actually comprised of 6 different FIR filters of
length 16).   

I am surprised that this example is so quick to overwhelm Gnuplot. I
suspect there is something strange in the way Gnuplot is handling
Octave's temporary plot files, but since I know of no way to guarantee
that the command "purge_tmp_files" will wait until after Gnuplot has
completed drawing the plots, it is pretty much impossible to verify this
hypothesis.

The only reason I want to do this is to be able to monitor the progress
of the solver, so the flickering is not really a critical issue, but it
does seem like something that I should be able to work around without
changing anything in Octave's core functionality.  Any ideas?

-EJR



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]