help-octave
[Top][All Lists]
Advanced

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

Problem with resetting title in a loop with postscript output


From: Joachim Geiger
Subject: Problem with resetting title in a loop with postscript output
Date: Thu, 7 Oct 2004 02:47:23 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913

Hello,
I am encountering a problem with the gnuplot interface (maybe) when
I try to reset the title in a loop to update is for the next plot.
It works fine when the output is on the screen. In the example below
4 pictures are coming up (don't forget to press return to continue).
But, if you uncomment the gset command to put the output in the
postscript file pictures.ps, you get actually 7 pictures in the following
order:
1.  first title first plot
2.  second title first plot
3.  second title second plot
4.  third title second plot
and so on. It seems that whenever I execute the gset command an automatic
replot command is also issued. Does anyone no how to avoid this?
I my actual problem I am expecting around 92 plots and I don't want
to go through them and throw out every second plot by hand.

Hope for help,
best regards,
Joachim

Following is the example:

#gset output "pictures.ps";
#gset term post color solid;
data=zeros(101,3);
data(:,1)=linspace(0,1,101)';
data(:,2)=rand(101,1);
data(:,3)=rand(101,1);
for i=1:1:2
titlestring=strcat("Do plot 1 in cycle ",int2str(i));
eval( sprintf('gset title "%s"',titlestring));
gplot data u 1:2;
pause;
titlestring=strcat("Do plot 2 in cycle ",int2str(i));
eval( sprintf('gset title "%s"',titlestring));
gplot data u 1:3;
pause;
endfor

--
address@hidden
Joachim Geiger                                  @\\
Institute for Plasma Physics, Euratom Association\\\
Department E3                                     \\\__
Wendelsteinstr. 1                                (  \\ \
D-17491 Greifswald, Germany                       \_ \\(_
Tel.: 03834/88-2327                                 ) \\ \
e-mail: address@hidden                   \  -  |
---------------------------------------------------  \____/



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