0

I am using Octave 3.8.1 on an iMac (Yosemite OS) with gnuplot and x11. I have a small series of images, a short movie in fact, that I want to display in sequence without entire plot refreshing and flashing. I seem to have spent hours trying to research this on the Internet. For example:

X is a structure of FN frames, each of which is a 480x640 RGB color image. (A video, in other words.)

X=load("cam1");
[fx,fy,fcol,fn]=size(X.vidFrames)
% here fx=480, fy=640, fcol=3 for RGB datasets, and fn=number of frames
% X needed to be flipped so as not to display upside down
for i=1:fn
    imshow(X.vidFrames(end:-1:1,:,:,i));
    drawnow;
    pause(.1);
end

This works OK .. EXCEPT each frame flashes as the entire plot window is cleared/redrawn by default for each new frame. The data here doesn't have to be a movie; all such plot function animations seem to flash all the time whether videos or differential equation time-series, etc. ... except maybe when using pcolor(). How do I turn off this plot refresh? So frustrating. I just want the next image/figure simply to overdraw the current one.

Thank you.

ps / I do not recall ever having this problem using Octave on Windows PCs ...

asiwel
  • 11
  • 4

1 Answers1

0

I've been having the same problem. I'm using Octave v4.0. I've found a bit of a weird way to fix it.

Grab the window and shake it around until it goes clean. The window bugs out a bit and doesn't correctly follow the mouse. But, eventually (after <10 seconds of shaking the window), it settles down and draws the next frame without issue from then on.

Additionally, if you don't close the figure window, it won't have issues like this anymore.

No, I don't know why this works. But it reproducibly does work for me.

Multihunter
  • 5,520
  • 2
  • 25
  • 38