[ncl-talk] 回复: Significance with contour: positive in solid line andnegative in dash line

刘振 286909655 at qq.com
Thu Aug 16 20:43:41 MDT 2018


Dear Mary,


  Thanks a lot for you reply and very good suggestions.
  Your methods perfectly solve my second problem.
  But, for the first one, it is, somehow, a little tricky. The contour line I want to plot represents p value (according to student's t test), which is always positive. In order to plot the positive (value in shading) with solid line while negative with dash line, I use ‘prob=where(var.lt.0,-prob,prob)’ in my script to change the p value (i.e., prob) first. Then I plot the p value using contour with negative p value in dash. But the region at 95% significant area totally changed. Please check the differences between the two outputs attached. The var.pdf should be the right one. Could you please help me to solve this issue. Thanks.


Best regards,
zhen
 

------------------
刘振
 中山大学
环境科学与工程学院
大气科学系
Phone: +86-15013246049
 Liu  Zhen
 Department of Atmospheric Science
School of Environmental Science and Engineering
 Sun Yat-sen University
Email address: liuzhen9 at mail2.sysu.edu.cn 


 




------------------ 原始邮件 ------------------
发件人: "Mary Haley"<haley at ucar.edu>;
发送时间: 2018年8月17日(星期五) 上午7:49
收件人: "刘振"<286909655 at qq.com>;
抄送: "ncl-talk"<ncl-talk at ucar.edu>; 
主题: Re: [ncl-talk] Significance with contour: positive in solid line andnegative in dash line



Dear Zhen,


One way to find out if there's an example for something specific you are trying to do, you can use the "tips" link on the examples page:


List of tips, resources, functions/procedures and the example scripts they appear in.


Which takes you to this page:


http://www.ncl.ucar.edu/Applications/concepts_list.shtml



You can then use your browser search to search for "negative" or "positive".  You will find this under the search for "negative":


Drawing negative contour lines as dashed lines
    conOncon_1.ncl (contours on contours)
    conOncon_2.ncl (contours on contours)
    conOncon_4.ncl (contours on contours)
    coneff_3.ncl (contour effects)
    coneff_5.ncl (contour effects)
    coneff_6.ncl (contour effects)
    coneff_9.ncl (contour effects)





I recommend clicking on the link inside the "(...)" and not the actual NCL script, because this way you can see the description of the example, the image, and the link to the script. A good example to start with is "coneff_3.ncl":


http://www.ncl.ucar.edu/Applications/coneff.shtml#ex3



which mentions two resources, gsnContourNegLineDashPattern and gsnContourPosLineDashPattern


http://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnContourNegLineDashPattern

http://www.ncl.ucar.edu/Document/Graphics/Resources/gsn.shtml#gsnContourPosLineDashPattern



which should hopefully answer your first question.


To answer your second question, you can also use the "tips" page, but this time search for "dot" or "stipple". In this case, "dot" gives you the best results, and "coneff_11.ncl" may be the best example to look into.  The resources cnFillScaleF and cnFillDotSizeF may help you with the density and size of your dots.



http://www.ncl.ucar.edu/Applications/coneff.shtml#ex11



If this doesn't help, please post back to ncl-talk.


Thanks,


--Mary




On Thu, Aug 16, 2018 at 8:02 AM, 刘振 <286909655 at qq.com> wrote:
Dear Sir/Madam,


  I use the script attached to plot the significance area (student's t test) with contour lines. I am wondering if there is a way to make the positive area (shading) in solid line while negative area in dash line. The output is also attached. Thanks.
  For another output named T2-CTLF-CTL-sum.pdf, most of the area are at 95% significant. By contrast, only region not significant show with contours. Could you also tell me how to deal with such kind of situation. I try to use dot instead of contour to show significant area. But all the plot become black because of the data at a high resolution. Here comes the question that how to decrease the density of the dots? Thanks.


Best regards,
zhen


------------------
刘振
 中山大学
环境科学与工程学院
大气科学系
Phone: +86-15013246049
 Liu  Zhen
 Department of Atmospheric Science
School of Environmental Science and Engineering
 Sun Yat-sen University
Email address: liuzhen9 at mail2.sysu.edu.cn 


 

_______________________________________________
 ncl-talk mailing list
 ncl-talk at ucar.edu
 List instructions, subscriber options, unsubscribe:
 http://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180817/5f32680a/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: T2.pdf
Type: application/octet-stream
Size: 712381 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180817/5f32680a/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: var.pdf
Type: application/octet-stream
Size: 624750 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180817/5f32680a/attachment-0003.obj>


More information about the ncl-talk mailing list