help-octave
[Top][All Lists]
Advanced

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

Problems fixing contour routine (Part 2)


From: Victor Munoz
Subject: Problems fixing contour routine (Part 2)
Date: Thu, 6 Jun 2002 13:26:39 -0400 (CLT)


  Hello. Yesterday I posted a message telling my problems with a script to
improve contour plots. I have received no answers yet, but I kept
investigating, and found this:

  The following lines of code do what I want: superimpose two contour
plots and a simple line in the same graph:

-----------------test file--------------------
load -force reimf.txt;
cont1=contorno(rex,imx,ref,[0 0]);
cont2=contorno(rex,imx,imf,[0 0]);
gplot cont1;axis([.4 .7 -.05 .01]);replot;
hold on;
gplot cont2;axis([.4 .7 -.05 .01]);replot;
plot([.45 .5],[-.03 0],'b');
hold off;
----------------end of file-------------------

contorno() is the function file I created, and basically writes to
a file the contour lines, changing the terminal to "table". It returns
the name of the temporary file where the data are written (something like
/tmp/tabla_contornoN.txt, with N an integer).
 This file works fine.
 However, if I add a last line with system("rm /tmp/tabla_contorno*.txt"),
gnuplot complains and the figure is spoiled. I eventually noticed, sending
messages to the screen, that "system" is called before gnuplot tries to
plot. So now this has more sense, because gnuplot finds no file.
 Probably this strategy of delaying plot until the end is known by many of
you. I just noticed it today. But doesn't it cause problems to people who
thinks that lines in the scripts should be executed in sequence? Isn't it
a feature which could be addressed to make results more predictable? 
(I'm using version 2.0.16, anyway, maybe it matters...)

 Thanks in advance,

                                                Victor




-------------------------------------------------------------
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]