X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=blobdiff_plain;f=scilab%2Fmodules%2Fcacsd%2Fmacros%2Fnicholschart.sci;h=69c972a424bbc1a8420cf6ef3c73fe2ad3e1bed4;hp=971431e2fa7e8cda27f741e8179cbb80bd947b28;hb=e240cb72211860c65493168c33464c1f5656f4b1;hpb=9b7d5e5729cd33ec36bc65b0f4903160efce7fe8 diff --git a/scilab/modules/cacsd/macros/nicholschart.sci b/scilab/modules/cacsd/macros/nicholschart.sci index 971431e..69c972a 100644 --- a/scilab/modules/cacsd/macros/nicholschart.sci +++ b/scilab/modules/cacsd/macros/nicholschart.sci @@ -11,7 +11,10 @@ function nicholschart(modules,args,colors) l10=log(10); ratio=%pi/180; - drawlater() + fig=gcf(); + immediate_drawing=fig.immediate_drawing; + fig.immediate_drawing="off"; + ax=gca(); nc=size(ax.children,"*") if nc==0 then @@ -32,8 +35,8 @@ function nicholschart(modules,args,colors) mod_min=ax.data_bounds(1,2) mod_max=ax.data_bounds(2,2) - defaultArgs = [1 5 10 20 30 50 90 120 150 180] - defaultModules=[mod_min:20:-40 -12 -6 -3 -1 0 0.25 0.5 1 2.3 4 6 12]; + defaultArgs = [1 2 5 10 20 30 50 70 90 120 140 160 180]; + defaultModules=[mod_min:20:-35 -30 -25 -20 -15 -12 -9 -6 -3 -2 -1 -0.5 -0.25 -0.1 0 0.1 0.25 0.5 1 2.3 4 6 12]; if exists("modules","local")==0 then @@ -178,17 +181,19 @@ function nicholschart(modules,args,colors) swap_handles(ax.children(k),ax.children(k+1)) end - drawnow() ; + fig.immediate_drawing=immediate_drawing; endfunction + function str=formatNicholsGainTip(curve,pt,index) //This function is called by the datatip mechanism to format the tip //string for the Nichols chart iso gain curves. ud=datatipGetStruct(curve); str=msprintf("%.2g"+_("dB"),ud.gain); endfunction + function str=formatNicholsPhaseTip(curve,pt,index) //This function is called by the datatip mechanism to format the tip //string for the Nichols chart iso phase curves. ud=datatipGetStruct(curve); - str=msprintf("%.2g"+_("°"),ud.phase) + str=msprintf("%.2g°",ud.phase) endfunction