|
From: | Ian Journeaux |
Subject: | Problem with Octave and GnuPlot |
Date: | Wed, 26 Jan 2011 15:37:32 -0600 |
I am not sure where exactly this problem lies and since it
is not 100% reproducible, I am unsure how to troubleshoot. My main program
processes a bunch of samples in series. Each sample involves loading Octave, running
an octave script which processes several images and exiting Octave. Most of the time this works. The script reads and image, performs some analysis, plots
the data using gnuplot, saves the plot to disk, save some data as tex files and
dumps the results into Excel via Oct2XLS. Unfortuantely the script often stops dead in its tracks after
the gnuplot figure is created and saved and before a text file is created with
the results, Sometimes the gnuplot window is left up othertimes the GNU plot
window is closed. Octave doesn’t crash it is just unresponsive. I had read of possible incompatibilties between Octave 3.2.4
and the oct2mat package so I set Oct2mat to not load automatically. That did
not change the result. Interestingly, if I have 20 images to be analyzed, the
image Octave hangs on changes from one time to the next. Sometimes it fails on
the 1st image. I realize a code snippet isn’t to valuable but since I
can reliably make the problem occur, it probably doesn’t matter. In the
code below, Octave becomes unresponsive after the file missdots.jpg is created and
before the helioprofile.tex file is opened. The graphic that is being created
is pretty simple. Appreciate any thoughts. % Plotting graphs dista(1:20)=dist(NbrImageAnalyzed)/10; % multiplot(1,2); count=[0 count]; counti=[0 counti]; figure(1); subplot(2,1,1); plot(0:11,count'); xlabel('Distance from origin (cm)'); ylabel('Missing dots'); title('Missing dots per cm'); axis ([0 10]); xl=floor(dist(NbrImageAnalyzed)); xxl=(1:xl)/10; yyl(1:xl)=20; subplot(2,1,2); if NUM<500; plot(0:11,counti,dista,1:20,"r",xxl,yyl,"r"); else plot(0:11,counti'); endif; axis ([0 10]); xlabel('Distance from origin (cm)'); ylabel('Cumulated missing dots'); title('Missing dots per cm
(cumulated)'); % text(-0.3,20,'20'); T1=strcat(Ta,'missdots.jpg'); print((1),T1,'-djpg'); close all count(1)=[]; counti(1)=[]; TT=strcat(Ta,'Helioprofile.tex'); % TT=strcat('Helioprofile.tex'); file=fopen(TT,'w'); aa=1:11; result=[aa' count' counti']; fprintf(file,'%d & %d & %d
\\\\ \n',result'); fclose(file); |
[Prev in Thread] | Current Thread | [Next in Thread] |