help-octave
[Top][All Lists]
Advanced

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

Re: Print plot error


From: Ben Abbott
Subject: Re: Print plot error
Date: Sat, 22 Aug 2009 14:34:29 -0400

On Aug 22, 2009, at 12:19 PM, Ben Abbott wrote:

On Aug 22, 2009, at 12:46 AM, John B. Thoo wrote:

On Aug 20, 2009, at 1:45 PM, John B. Thoo wrote:

Hi.  I was using the script (see below) to print a sequence of plots
as .png files so that I may create a movie using QuickTime Pro.
Everything was going well until about half the plots had been
printed, and I got the following error:

octave-3.2.0:36> makemovie
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: fork:
Resource temporarily unavailable
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 67: /
bin/gnuplot-4.2.5: No such file or directory
^C

octave-3.2.0:36>


What does this indicate?

A second question: It takes a while to draw each plot (x11) before it
is printed.  Is there a way to suppress the drawing, and only print
the .png files from the data?


%% BEGIN SCRIPT
%% script name: makemovie.m

clf

filename = "muNegOne_ord7tf1";


wait = max (1/(tf - t0 + 1), 0.05);   % pause time between frames

lT = length (T) - 1; % T = total number of plots saved in data file
N = 150;   % number of time intervals (frames) to plot (must have N
<= lT)

if (N > lT)
 error ('N > lT;  need  N <= lT');
end

time = ones (1, N);
time(2:N+1) = floor ((lT/N)*(1:N)) + 1;

for j = 1:N+1   % for "ode45"
 plot (x, u(:,time(j)));
 title (strcat ('time =', num2str ((tf-t0)*(time(j) - 1)/lT)));
 axis ([0 2*pi -1.5 1.5]);
%  axis([0 2*pi 2*min(real(u0)) 2*max(real(u0))]);
 print (sprintf ("./MakeMovie/%s%d.png", filename, j), "-dpng");
 pause(wait);
end

%% END SCRIPT

(Any suggestions to clean up my script would also be appreciated.)

I am using Octave 3.2.0 and gnuplot 4.2 patchlevel 5 on Mac OS X
10.4.11.  Both Octave.app and Gnuplot.app were installed from Thomas
Treichl's .dmg disc image into my Applications folder.

Thanks.

---John.

Hi, again.  Just an update.  I upgraded to Octave 3.2.2, but still
get that error.

My workaround had been to  1) open Octave,  2) load the data file
(which takes several minutes),  3) print about 50 plots,  4) quit
Octave,  5) repeat until all the desired plots in the sequence have
been printed.  A bit tedious, but it works.

---John.

To suppress x11 plotting, start you script with ...

        figure (1, "visible", "off")

Each figure opens a specific instance of gnuplot. If the figure is not
visible, then there will be no gnuplot opened. Each time you print, a
new pipe to a specific instance of gnuplot will be opened.

I'm not sure what is happening, but it may be that your running so
many instances of gnuplot that your Mac has run our of RAM.

You can try running "Activity Monitor" and selecting the "System
Memory" tab. When you run your script does the memory fill up?

Ben

Never mind the advice. I've just run the code below ...

more off
filename = "myRandomFrames";
for n = 1:1000
  imagesc (rand (8))
  axis image
  fprintf ("Printing frame %d\n", n);
  print  (filename, "-dpng");
endfor

I get the same error you reported.

sh: fork: Resource temporarily unavailable
/sw/bin/gnuplot: fork: Resource temporarily unavailable
warning: broken pipe -- some output may be lost

If I close all figures and try again ...

sh: fork: Resource temporarily unavailable
error: value on right hand side of assignment is undefined
error: called from:
error: /Users/bpabbott/Development/Octave_Toolbox/print/test_movie.m at line 10, column 12
/sw/bin/gnuplot: fork: Resource temporarily unavailable
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost
warning: broken pipe -- some output may be lost

For me there are never more than 3 instanced of gnuplot acitve.

The error is from the shell. Unfortunately, I have no idea how to determine where the problem lies.

Ben




reply via email to

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