<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">That example is filling in the array from opposite ends in one loop. e.g. first half is in the normal order, second half is in the reverse order. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">e.g.</div><div class="gmail_default" style="font-family:verdana,sans-serif"><div class="gmail_default">nlat=30</div><div class="gmail_default">xp = new( (/2*nlat/), float )</div><div class="gmail_default"> </div><div class="gmail_default">do k=0,nlat-1</div><div class="gmail_default"> xp(k) =(k)</div><div class="gmail_default"> xp(2*nlat-1-k) = (k)</div><div class="gmail_default"> print(""+(2*nlat-1-k)+" "+k)</div><div class="gmail_default">end do</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">so if you print(xp) at the end it is 0..10..20..30..20..10..0 Your way would have been 0..10..20..30..0..10..20..30</div><div class="gmail_default"><br></div><div class="gmail_default">Draw the shape by hand without lifting the pen. You'd draw the lower edge, up, then top edge back to the start. The way you were doing it, was to draw the bottom edge, straight line back to the start, then draw top edge and finish with a straight line back to the start again. </div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">Look at the arrays, print(xp+" , "+yp) it should become clear what has changed. </div><div class="gmail_default"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 2:52 PM, 刘振 <span dir="ltr"><<a href="mailto:286909655@qq.com" target="_blank">286909655@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi,</div><div><br></div><div>It works. But I can not understand. I didn't see any value differences of xp and yp. Why it works? And actually I do this before because I copy the part from ncl website. See attached links:</div><div><a href="https://www.ncl.ucar.edu/Applications/Images/xy_10_lg.png" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Images/xy_10_lg.<wbr>png</a></div><div><a href="https://www.ncl.ucar.edu/Applications/Scripts/xy_10.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/xy_10.ncl</a></div><div>But why there is no connection line from start point to the end point. I don't think the value is same for the start and end points. Thanks.</div><span class=""><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000"><div>刘振</div>
<div>中山大学<br>环境科学与工程学院<br>大气科学系<br>Phone: <a href="tel:+86%20150%201324%206049" value="+8615013246049" target="_blank">+86-15013246049</a></div>
<div>Liu Zhen</div>
<div>Department of Atmospheric Science<br>School of Environmental Science and Engineering</div>
<div>Sun Yat-sen University<br>Email address: <font color="#7f7f7f"><a href="mailto:liuzhen9@mail2.sysu.edu.cn" target="_blank">liuzhen9@mail2.sysu.edu.cn</a></font> </div></div></div><div> </div></span><div><div><br></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ 原始邮件 ------<wbr>------------</div><div style="font-size:12px;background:#efefef;padding:8px"><div><b>发件人:</b> "Alan Brammer";<<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>><wbr>;</div><div><b>发送时间:</b> 2017年10月14日(星期六) 凌晨2:40</div><div><b>收件人:</b> "刘振"<<a href="mailto:286909655@qq.com" target="_blank">286909655@qq.com</a>>;</div><div><b>抄送:</b> "NCL"<<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>>; </div><div><div class="h5"><div><b>主题:</b> Re: [ncl-talk] no value at the equator and additional line using gsn_add_polygon</div></div></div></div><div><div class="h5"><div><br></div><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">ahh, There's actually a thickness to that line. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">At the moment, your xp coord goes from -90 : 90 then repeats -90 :90. </div><div class="gmail_default" style="font-family:verdana,sans-serif">You want to flip the direction of the 2nd half of the array so rather than start at 90S twice (and creating a discontinuity in the data halfway through) it traces the +std line in 1 direction then smoothly traces the -std line back to the origin. </div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">Not tested!!</div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><div class="gmail_default">xp(:nlat-1)=lat</div><div class="gmail_default">xp(nlat:(2*nlat-1))=lat(::-1)</div><div class="gmail_default"><br></div><div class="gmail_default">yp(:nlat-1)=pr_lat(0,:)+allf_<wbr>std</div><div class="gmail_default">yp(nlat:(2*nlat-1))=pr_lat(0,:<wbr>:-1)-allf_std(::-1)</div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">Good luck. </div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 2:25 PM, 刘振 <span dir="ltr"><<a href="mailto:286909655@qq.com" target="_blank">286909655@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi -,</div><div><br></div><div> Thanks for your reply. But for the second question, if you look at the Figure 2 in detail, I want to shading the one standard deviation of the red line. But I want to delete the addition red line from the start point to end point. So the function gsn_add_polyline may not satisfy my requirement. Is there any other solutions? Thanks.</div><span><div><br></div><div>Best regards,</div><div>zhen</div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000"><div>刘振</div>
<div>中山大学<br>环境科学与工程学院<br>大气科学系<br>Phone: <a value="+8615013246049">+86-15013246049</a></div>
<div>Liu Zhen</div>
<div>Department of Atmospheric Science<br>School of Environmental Science and Engineering</div>
<div>Sun Yat-sen University<br>Email address: <font color="#7f7f7f"><a href="mailto:liuzhen9@mail2.sysu.edu.cn" target="_blank">liuzhen9@mail2.sysu.edu.cn</a></font> </div></div></div><div> </div></span><div><div><br></div><div><br></div><div style="font-size:12px;font-family:Arial Narrow;padding:2px 0 2px 0">------------------ 原始邮件 ------<wbr>------------</div><div style="font-size:12px;background:#efefef;padding:8px"><div><b>发件人:</b> "Alan Brammer";<<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>><wbr>;</div><div><b>发送时间:</b> 2017年10月14日(星期六) 凌晨2:03</div><div><b>收件人:</b> "刘振"<<a href="mailto:286909655@qq.com" target="_blank">286909655@qq.com</a>>;</div><div><b>抄送:</b> "ncl-talk"<<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.e<wbr>du</a>>; </div><div><b>主题:</b> Re: [ncl-talk] no value at the equator and additional line using gsn_add_polygon</div></div><div><div class="m_-827296772992066632h5"><div><br></div><div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif"><span style="color:rgb(0,0,0);font-family:arial,sans-serif;font-size:12.800000190734863px">> why there is a white line over the equator? How to remove it?</span><br></div><div class="gmail_default"><font color="#000000"><span style="font-size:12.800000190734863px">You mean Greenwich Meridian? </span></font></div><div class="gmail_default"><a href="https://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnAddCyclic" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Graphics/Resources/gsn.<wbr>shtml#gsnAddCyclic</a><font color="#000000"><span style="font-size:12.800000190734863px"><br></span></font></div><div class="gmail_default">You set this resource to false, therefore NCL did not bridge the gap. </div><div class="gmail_default"> Near the top of your res file:</div><div class="gmail_default">> res@gsnAddCyclic = False ; data already has cyclic point<br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><span style="color:rgb(0,0,0);font-size:12.800000190734863px">> For All_F in red shading line, why there is a addition red line connect from the beginning to the end. I found it seems to be a problem with gsn_add_polygon function I used. </span><br></div><div class="gmail_default"><font color="#000000"><span style="font-size:12.800000190734863px"><br></span></font></div><div class="gmail_default"><font color="#000000"><span style="font-size:12.800000190734863px">It's trying to draw a polygon (i.e. a closed shaped), the docs clearly state that if first and last points are not equal then the function will close the shape for you. If you just want a line, then draw a polyline. </span></font></div><div class="gmail_default"><a href="https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_polyline.shtml" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/Graphics/Interfaces/gsn_<wbr>add_polyline.shtml</a><font color="#000000"><span style="font-size:12.800000190734863px"><br></span></font></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><span style="color:rgb(0,0,0);font-size:12.800000190734863px">> The third question is how can I add more space between legend labels vertically (i.e. All_F and Aero) in Figure 2?</span><br></div><div class="gmail_default"><a href="https://www.ncl.ucar.edu/Applications/legend.shtml" target="_blank">https://www.ncl.ucar.edu/Appli<wbr>cations/legend.shtml</a><br></div><div class="gmail_default">Starting point is probably the resource pmLegendHeightF lots of examples of legend layout though. </div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default">Documentation, the user guide and google for old ncl-talk emails will go a long way. </div><div class="gmail_default"><a href="https://www.ncl.ucar.edu/Document/" target="_blank">https://www.ncl.ucar.edu/Docum<wbr>ent/</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">Good luck, </div><div class="gmail_default"><br></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 13, 2017 at 1:13 PM, 刘振 <span dir="ltr"><<a href="mailto:286909655@qq.com" target="_blank">286909655@qq.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Dear Sir/Madam:</div><div><br></div><div> Attached please find my script and figures. I got three questions about the figures.</div><div> Figure 1: why there is a white line over the equator? How to remove it?</div><div> Figure 2: For All_F in red shading line, why there is a addition red line connect from the beginning to the end. I found it seems to be a problem with gsn_add_polygon function I used. How to remove this line? </div><div> The third question is how can I add more space between legend labels vertically (i.e. All_F and Aero) in Figure 2?</div><div> Look forward to your replies. Thanks.</div><div><br></div><div>Best regards,</div><div>zhen</div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px">------------------</div><div style="font-size:14px;font-family:Verdana;color:#000"><div>刘振</div>
<div>中山大学<br>环境科学与工程学院<br>大气科学系<br>Phone: <a value="+8615013246049">+86-15013246049</a></div>
<div>Liu Zhen</div>
<div>Department of Atmospheric Science<br>School of Environmental Science and Engineering</div>
<div>Sun Yat-sen University<br>Email address: <font color="#7f7f7f"><a href="mailto:liuzhen9@mail2.sysu.edu.cn" target="_blank">liuzhen9@mail2.sysu.edu.cn</a></font> </div></div></div><div> </div><br>______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>