On 11/16/2012 11:10 AM, Surandokht Nikzad wrote: > Hi there; > > > I think there is bug/error while I am plotting: > > error: __getlegenddata__: subscript indices must be either positive > integers or logicals > error: called from: > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/private/__getlegenddata__.m > at line 38, column 11 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/private/__plt__.m > at line 57, column 23 > error: > /Applications/Octave.app/Contents/Resources/share/octave/3.4.0/m/plot/plot.m > at line 194, column 9 > > Here is the script: > > a=[]; > > [files]=dir('*.txt'); > > for i=1:length(files) > > a=vertcat(a,dlmread(files(i).name,'',1,0)); > > end; > > > d=0.01; > > doc_ef=a(:,2); > > run_doc=0:d:20; > > dens_est_doc_ef=kernel_dens(ones(size(run_doc)),doc_ef+5,run_doc); > > plot(run_doc,dens_est_doc_ef,'color',[0.9100 0.4100 0.1700],'linewidth',2); > > xlabel('a',"fontsize",16); > > ylabel('b',"fontsize",16); > > a=legend('{\fontsize{16} screen}','{\fontsize{16} screen}'); > > text(10,0.5,'No_o_b_s screen=101',"fontsize",12) > > grid on > > > I have to use this again to dauble plotting in one graph. > The fist time use of this script is fine. No error. > However, when I use for the second time for the second data set, I do > have the above error! > > Is there any way to solve this problem?
It's difficult to debug such a thing. Developers typically work with the development version or the most recent stable release. To go back to 3.4 is a bit of guess work without re-installing that version and rebuilding. But often these things get fixed along the way so to go back to 3.4 without knowledge the bug still exists in the development version is repeating work. Also, try to isolate the problem to as parsimonious code as possible so that others may reproduce on their setups. We don't know what data files you are using, and kernel_dens is not a routine in the standard Octave package. If it were code I could easily run here I could try this on Octave 3.6+ series and tell you whether that works. As for specific error in your case, I don't know what the legend code is doing with subscripts. Maybe the underscore '_' in your variables is confusing the code. Try removing the underscores in the variables, or maybe change the translation setting of "latex" on or off. It's hard to say. Dan > > Your help and advice greatly appreciated. > Sue > > > > ------------------------------------------------------------------------------ > Monitor your physical, virtual and cloud infrastructure from a single > web console. Get in-depth insight into apps, servers, databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho_dev2dev_nov > > > > _______________________________________________ > Octave-dev mailing list > Octave-dev@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/octave-dev -- Dan Sebald email: daniel(DOT)sebald(AT)ieee(DOT)org URL: http://www(DOT)dansebald(DOT)com ------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov _______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev