help-octave
[Top][All Lists]
Advanced

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

saving plot to file, Ghostscript collision error?


From: Nicholas Jankowski
Subject: saving plot to file, Ghostscript collision error?
Date: Fri, 15 Jun 2012 22:14:06 -0400

Using Octave3.6.2gcc4.6.2 on windows (mingw) running the same octave
script on separate cores for some brute force 'parallel processing', I
have the script generate and save a bunch of plots as it goes along.
Done this a number of times, and this was the first I noticed the
following error message popping up:

-----
GPL Ghostscript 9.05: Unrecoverable error, exit code 1
The process cannot access the file because it is being used by another process.
-----

Octave continues with the loop, running followon iterations. Looking
in the output folder, a couple of the plot files are missing. others
are there but missing elements (usually the plot is there but the
label I put on each graphic is missing).

certain scripts run faster, so in the past the different processes
usually hit this part of the script at different times. this time I
restarted them all at this spot, and noticed all of these error
messages.

So, is ghostscript using some temporary files to generate plot images
and I can't have separate Octave instances calling it?

here's the sloppy code creating the two plots per iteration. I think
the jpg one is the one that runs into problems

fig1=plot(ZZ,normtemps,"*");
hold on;
plot(sortedtrue(:,1),sortedtrue(:,2),"linewidth",3,'k');
axis('square');
text(get(gca(),"xlim")(2)*.75,get(gca(),"ylim")(2)*.75,"stringtoprinthere");
hold off;
saveas(fig1,"filenamehere",".jpg"));

fig3=plot(anasteptimes,xxana_l,"b",steptimes,xx,"xr"); axis("square");
text(get(gca(),"xlim")(2)*.75,get(gca(),"ylim")(2)*.75,"stringtoprinthere");
saveas(fig3,"filenamehere",".emf"));


reply via email to

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