From: Stefan v. d. W. <st...@su...> - 2004-11-17 12:14:47
|
This is related to the popen thread on the maintainers list. You can apply some dirty fixes to make legend work, but unless the underlying problem is sorted out, it won't help much in the long run. Regards Stefan On Wed, Nov 17, 2004 at 12:31:04PM +0000, Michael Creel wrote: > I've been having some problems with legend.m in the plot subdir. > > Running analyze.m (attached) gives the following: > > octave:1> analyze > error: invalid row index = 0 > error: evaluating argument list element number 1 > error: evaluating argument list element number 1 > error: evaluating prefix operator `!' near line 190, column 7 > error: if: error evaluating conditional expression > error: evaluating if command near line 190, column 3 > error: called from `legend' in file > `/usr/share/octave/2.1.60/site/m/octave-forge/plot/legend.m' > error: near line 11 of file `/home/mcreel/mpi_work/mle/analyze.m' > octave:1> analyze > warning: in fopen near line 55, column 3: > warning: fopen: default open mode is now binary > octave:2> > > > Note that the error only occurs the first time (?!). On the first run, the > legend is not displayed properly. On the second run, the legend appears, but > the line colors in the legend are different from those of the lines. > > Commenting out lines 190-192 of legend.m seems to solve the problem, but I'm > not sure what those lines are intended to do, so I don't want to make a > change in CVS myself. > > analyze.m and the data file are attached to allow replication. TIA, Michael > # Created by Octave 2.1.57, Mon Nov 15 11:10:30 2004 EST <knoppix@Knoppix> > # name: results > # type: matrix > # rows: 16 > # columns: 5 > 0 177.842718999833 34 177.842718999833 34 > 1 102.047008000314 34 80.9450099989772 28 > 2 74.6442850008607 34 76.3819399997592 37 > 3 60.9242219999433 34 51.8810830004513 31 > 4 52.3526020012796 34 44.7404210008681 31 > 5 47.1040069982409 34 39.3766609989107 30 > 6 43.8579909987748 34 33.3388470001519 27 > 7 42.2064960002899 34 33.983719997108 29 > 8 40.4449319988489 34 33.7770080007613 30 > 9 40.2781639993191 34 32.7890330031514 30 > 10 39.4343860000372 34 33.5620189979672 31 > 11 39.2160080000758 34 30.0757489986718 28 > 12 39.6577120013535 34 32.039197999984 30 > 13 39.4133560024202 34 30.1878300011158 28 > 14 40.2218270003796 34 32.7937540002167 30 > 15 40.0913539975882 34 33.1381429992616 30 > load Cluster-16_nodes-ML-NBSNP-results.out; > > m = max(results(:,4)); > axis([1,10,0,m]); > plot(results(:,2)); > hold on; > plot(results(:,4)./ results(:,5)*34); > t = results(1,4) ./ (1:16)'; > plot(t); > > legend("Actual time", "Actual time (alt)","Lower limit",-1); > legend("show"); > xlabel("number of nodes"); > ylabel("time"); > replot; > print("mle_results.eps", "-depsc2"); > |