From bug-octave-request at bevo dot che dot wisc dot edu Sat Sep 26 00:26:13 1998 Subject: octave bug (plot command) From: "John W. Eaton" To: Juergen dot Weith at t-online dot de (juergen.weith@t-online.de) Cc: bug-octave at bevo dot che dot wisc dot edu Date: Sat, 26 Sep 1998 00:26:11 -0500 (CDT) On 30-Jul-1998, juergen dot weith at t-online dot de wrote: | yesterday I found a strange behaviour of octave. Please find below my bug | report. Btw, thanks for maintaining this great tool, I am doing all my | computations with octave and it works very well ... | | Best regards | | Juergen | -----------------BUG REPORT----------------------------------------------------- | | Octave vers. used: 2.0.13 (i486-pc-linux-gnulibc1) | Linux kernel: 2.0.33 | Configuration: ./configure --enable-shared --enable-dl --enable-lite-kernel | | Description: A problem occurs when using the plot command to draw more | than one curve in one corordinate system and generating fig | output. | | Example: Consider the following simple program: | gset term fig; % set to fig output | gset output "dummy.fig"; % direct to file dummy.fig | x=(0:99)'/100*2*pi; % example data sequence | s1=sin(x); % generate sine samples | s2=2*cos(x); % generate cosine samples | sigs=[x s1 s2]; % Construct a matrix to plot | plot(sigs(:,1),sigs(:,2),sigs(:,3),sigs(:,4)); | closeplot; | | The plot output in dummy.fig looks strange. It seems to me | that calling plot executes two single plot commands each | of which is scaled separately (whereas scaling should be done | once only). | | Hoewver replacing the plot command by | gplot sigs using 1:2, sigs using 1:3 | results in a c o r r e c t output. Yes, because the plot command eventually generates something like the following sequence of gnuplot commands plot sigs using 1:2 replot sigs using 1:3 (This is the same problem that someone else reported earlier about the postscript terminal type and that I just responded to a few minutes ago). The workaround is to set up the plot to the screen (or /dev/null) and then use replot to generate the final file. As I said earlier, the plot command could probably be fixed to avoid the problem, but doing that's not high on my list. Any volunteers? jwe