Hi Mary,<br/><br/>  Thank you so much for your cleaning tips (I have changed the script related with tip 1 in the last email based on your tips before), which are very useful. Sometimes I indeed find the script is quite slow. Yes, I do still have problems with the dots. The following figure shows parts of the dots are not shown on the plot (print("lat / plev = "+lat(indices(ip,1))+"/"+plev(indices(ip,0)))). The dots are not out of the range of the X and Y axes. I still cannot figure out what is going on and need your further help. Thanks.<br/>(0)     lat / plev = -25/85000<br/>(0)     lat / plev = -23/85000<br/>(0)     lat / plev = -21/85000<br/>(0)     lat / plev = -19/85000<br/>(0)     lat / plev = -17/85000<br/>(0)     lat / plev = -15/85000<br/>(0)     lat / plev = -11/85000<br/>(0)     lat / plev = -3/85000<br/>(0)     lat / plev = -1/85000<br/>(0)     lat / plev = 3/85000<br/>(0)     lat / plev = 5/85000<br/>(0)     lat / plev = 7/85000<br/>(0)     lat / plev = 13/85000<br/>(0)     lat / plev = 15/85000<br/>(0)     lat / plev = 27/85000<br/>(0)     lat / plev = 45/85000<br/>(0)     lat / plev = 47/85000<br/>(0)     lat / plev = 59.00000000000001/85000<br/>(0)     lat / plev = 61/85000<br/>(0)     lat / plev = 69/85000<br/>(0)     lat / plev = 73/85000<br/>(0)     lat / plev = 75/85000<br/>(0)     lat / plev = 77/85000<br/><br/>Best regards,<br/>zhen<br/><br/><br/>------------------刘振<br/> 中山大学<br/>环境科学与工程学院<br/>大气科学系<br/>Phone: +86-15013246049<br/> Liu  Zhen<br/> Department of Atmospheric Science<br/>School of Environmental Science and Engineering<br/> Sun Yat-sen University<br/>Email address: liuzhen9@mail2.sysu.edu.cn<br/><br/>---原始邮件---<br/>发件人:"Mary Haley"<haley@ucar.edu><br/>发送时间:2017年11月11日(星期六) 凌晨1:33<br/>收件人:"刘振"<286909655@qq.com>;<br/>主题: [ncl-talk] didn&#39;t show all markers<br/><br/><br/>Zhen,<br/><br/>Which markers in particular are not showing up? It&#39;s too hard for us to look at your output and try to figure out which dots are on the plot and which are not.<br/><br/>Also, it&#39;s very unlikely that NCL would just drop some of those dots.&#xA0; There has to be something else going on, like the dots are out-of-range of the limits of your X and/or Y axes.<br/><br/>[1] Clean coding tip: you do not need to loop across each index of the array to add each dot, if you are drawing them all with the same color and size. Instead of this code:<br/><br/>dot=new((/dimsizes(forc),dimsizes(lat)*dimsizes(plev)/),graphic)<br/>do iex=0,dimsizes(forc)-1<br/>&#xA0;. . .<br/><br/>&#xA0; do ip=0,npts-1<br/>&#xA0; &#xA0; dot(iex,ip) = gsn_add_polymarker(wks,plot(iex),lat(indices(ip,1)),plev(indices(ip,0)),resmarker)<br/>&#xA0; end do<br/><br/>you can have this code:<br/><br/>dot=new((/dimsizes(forc),dimsizes(lat)/),graphic)<br/>do iex=0,dimsizes(forc)-1<br/>&#xA0;. . .<br/>&#xA0; dot(iex) = gsn_add_polymarker(wks,plot(iex),lat(indices(:,1)),plev(indices(:,0)),resmarker)<br/><br/><br/>This will run faster, because each call to gsn_add_polymarker causes the creation of an internal object, and if you do this for each single dot, you are going to end up using more memory and taking more time.<br/><br/>[2] Clean coding tip: if you find yourself calling "dimsizes" on the same variable multiple times, I suggest saving it to a variable so it can save you some typing:<br/><br/>For example:<br/><br/>var_run = new((/dimsizes(forc),dimsizes(ens),dimsizes(year),23,90/),"float")<br/>var_djf_clim =&#xA0; new((/dimsizes(forc),dimsizes(ens),23,90/),"float") ; 10 years&#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;<br/>rc_m = new((/dimsizes(forc),23,90/),"float")<br/>do iv=0,dimsizes(vars)-1<br/><br/>could be changed to:<br/><br/>nforc = dimsizes(forc)<br/>nens&#xA0; = dimsizes(ens)<br/>nyear = dimsizes(year)<br/>nvars = dimsizes(vars)<br/>var_run = new((/nforc,nens,nyear),23,90/),"float")<br/>var_djf_clim =&#xA0; new((/nforc,nens),23,90/),"float") ; 10 years&#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0; &#xA0;<br/>rc_m = new((/nforc,23,90/),"float")<br/>do iv=0,nvars-1<br/>I don&#39;t know what "23" and "90" are supposed to represent, but it would be good to also assign these to variables as well, so if you need to change the 23 or 90 values later, you can just do it in one place.<br/>[3] Clean coding tip: you don&#39;t need to use "new" to preallocate an array that is getting calculated by a function.&#xA0; You have this code:<br/>rc_m = new((/dimsizes(forc),23,90/),"float")<br/>rc_m =&#xA0;regCoef_n(year,var_ens,0,1)<br/>Remove the "new" line as it is not needed.&#xA0; The regCoef_n function will allocate the memory for you, as does every single NCL function.<br/>If you continue to have problems with the dots, please be more specific about which dots are not showing up.<br/>--Mary<br/><br/><br/>On Thu, Nov 9, 2017 at 2:56 PM, 刘振 <286909655@qq.com> wrote:<br/><br/><br/>Dear all,<br/><br/>&#xA0; I am using ncl 6.4 to plot and want to print dot when value pass student t test using function gsn_add_polymaker (script and figure attached, i.e. 850hPa). But the dots are only printed at some levels (not all levels) in vertical direction. Actually, I got 23 pressure levels for my data and indeed some dot are not printed on the plot when I print the indices passing significance level (see log files attached). Could you please help me to solve this problem. Thanks.<br/><br/><br/>zhen<br/><br/>------------------<br/>刘振<br/> 中山大学<br/>环境科学与工程学院<br/>大气科学系<br/>Phone: +86-15013246049<br/> Liu&#xA0; Zhen<br/> Department of Atmospheric Science<br/>School of Environmental Science and Engineering<br/> Sun Yat-sen University<br/>Email address: liuzhen9@mail2.sysu.edu.cn&#xA0;<br/><br/><br/>&#xA0;<br/>_______________________________________________<br/> ncl-talk mailing list<br/> ncl-talk@ucar.edu<br/> List instructions, subscriber options, unsubscribe:<br/> http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br/> <br/><br/><br/>