[ncl-talk] 回复: 回复: gsn_add_polymarker when pass student t test
刘振
286909655 at qq.com
Tue Nov 7 14:04:17 MST 2017
Hi Mary,
Now the question becomes why the markers are just show up at some pressure levels (not all levels i.e. 850hPa). I have followed your suggestion to comment out the marker size line and do some debug print. You could see some values at 850hPa with 95% significance. Could you please further check what the problem is. 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>;
发送时间: 2017年11月8日(星期三) 凌晨3:20
收件人: "刘振"<286909655 at qq.com>;
抄送: "NCL"<ncl-talk at ucar.edu>;
主题: Re: [ncl-talk] 回复: gsn_add_polymarker when pass student t test
Sorry for the delay. I was out of the office last Friday and am now catching up on emails.
I'm not sure what your question is now. Your question before was why the markers were not showing up. Now that you are not setting the size to something really small, you are seeing the markers (on the third page of the PDF document you sent).
Is there another problem with the plot? If so, you need to be specific about what it is. If the markers are too large, you can try making them smaller by setting gsMarkerSizeF again, but don't set it to such a small value as you did before.
--Mary
On Tue, Nov 7, 2017 at 11:12 AM, 刘振 <286909655 at qq.com> wrote:
Hi Mary,
Gentle reminder that could you response if you have any further information. 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
------------------ 原始邮件 ------------------
发件人: "刘振";<286909655 at qq.com>;
发送时间: 2017年11月4日(星期六) 凌晨0:50
收件人: "Mary Haley"<haley at ucar.edu>;
抄送: "NCL"<ncl-talk at ucar.edu>;
主题: 回复: [ncl-talk] gsn_add_polymarker when pass student t test
Hi Mary,
May I know what's going on about this question? 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
------------------ 原始邮件 ------------------
发件人: "刘振";<286909655 at qq.com>;
发送时间: 2017年11月1日(星期三) 凌晨0:35
收件人: "Mary Haley"<haley at ucar.edu>;
抄送: "NCL"<ncl-talk at ucar.edu>;
主题: 回复: [ncl-talk] gsn_add_polymarker when pass student t test
Hi Mary,
Based on you suggestions, I have commented out the marker size line and done some debug print as attached. I am sorry the print is a little large. Could you help me further to investigate this problem. 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>;
发送时间: 2017年10月31日(星期二) 晚上11:56
收件人: "刘振"<286909655 at qq.com>;
抄送: "ncl-talk at ucar.edu"<ncl-talk at ucar.edu>;
主题: Re: [ncl-talk] gsn_add_polymarker when pass student t test
Dear Zhen,
Please respond back to ncl-talk with any follow-up.
I made a mistake in my email. You are absolutely correct that the X values are the third argument and the Y values are fourth argument.
I was thinking of a lat/lon plot, where lon would be the third argument and lat the fourth argument.
Your original gsn_add_polymarker call is correct.
So, this means you need to look at either your marker resource settings, or the locations of the markers.
I see that you are setting the size to:
resmarker at gsMarkerSizeF = 0.001
This is pretty small! You might want to comment this out to see what the default marker size looks like. Or, try making it larger a little bit at a time to see if it makes a difference.
If you continue to need help with this, then you will either need to provide the data file so I can run the script, or you need to provide some debug prints so we know what we're dealing with.
Debug prints would mean printing out the values of the marker locations with:
do ip=0,npts-1
print("lat / plev = " + lat(indices(ip,1)) + "/" + plev(indices(ip,0)))
end do
We also need to see the output from:
printVarSummary(rc_m)
--Mary
On Tue, Oct 31, 2017 at 9:04 AM, 刘振 <286909655 at qq.com> wrote:
Hi Mary,
Thanks for your reply. Remove the loop for marker is really good suggestion. But I don't think I swapped the X and Y arguments. Based on the function instruction in the link https://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_add_polymarker.shtml, the third argument is X location and the fourth one is the Y location.
Because when I swap the arguments as you suggested, I don't get any dots on my plot. Actually, if you check my plot carefully (pressure on Y axis and latitude on X axis), just some dots are missing (i.e. dots at 850hPa). And also I don't think my values are out range of my data because I use the whole data (not subset) to plot. Look forward to your further suggestions.
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>;
发送时间: 2017年10月31日(星期二) 晚上10:33
收件人: "刘振"<286909655 at qq.com>;
抄送: "ncl-talk"<ncl-talk at ucar.edu>;
主题: Re: [ncl-talk] gsn_add_polymarker when pass student t test
Zhen,
If the dots are not showing up on your plot, this is usually because the values you are passing to gsn_add_polymarker are outside the range of your data. I think that you simply have the two arguments to gsn_add_polymaker swapped.
Try changing:
dot(iex,ip) = gsn_add_polymarker(wks,plot(iex),lat(indices(ip,1)),plev(indices(ip,0)),resmarker)
to:
dot(iex,ip) = gsn_add_polymarker(wks,plot(iex),plev(indices(ip,0)),lat(indices(ip,1)),resmarker)
The third argument should be the *Y* locations of the dots, and the fourth argument the *X* locations.
Also, you don't need a do loop to plot each marker, especially since you are not changing the marker style inside the loop. Take this code:
do ip=0,npts-1
dot(iex,ip) = gsn_add_polymarker(wks,plot(iex),lat(indices(ip,1)),plev(indices(ip,0)),resmarker)
end do
and replace it with:
dot(iex) = gsn_add_polymarker(wks,plot(iex),lat(indices(:,1)),plev(indices(:,0)),resmarker)
You will also need to change the "new" command for "dot" to:
dot=new(dimsizes(forc),graphic)
--Mary
On Mon, Oct 30, 2017 at 2:05 PM, 刘振 <286909655 at qq.com> wrote:
Dear all,
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). 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. Could you please help me to solve this problem. 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
_______________________________________________
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/20171108/56209e9a/attachment.html>
More information about the ncl-talk
mailing list