<div><br></div><div><div>Hi Rick,</div><div><br></div><div>Thanks so much for your help. It does work now:</div><div><br></div><div>plus_minus_sign = "~H4V0F34~1~FV0H4~"</div><div><br></div><div>Thanks again,</div><div>Jie</div><div><br></div><div style="font-size: 12px;font-family: Arial Narrow;padding:2px 0 2px 0;">------------------ 原始邮件 ------------------</div><div style="font-size: 12px;background:#efefef;padding:8px;"><div><b>发件人:</b> "Rick Brownrigg"<brownrig@ucar.edu>;</div><div><b>发送时间:</b> 2019年11月11日(星期一) 凌晨0:04</div><div><b>收件人:</b> "WUJIE"<393069045@qq.com>;<wbr></div><div><b>抄送:</b> "ncl-talk"<ncl-talk@ucar.edu>;<wbr></div><div><b>主题:</b> Re: [ncl-talk] how to print the string of plus-minus sign on the figure with NCL</div></div><div><br></div><div dir="ltr"><div>Hi,</div><div><br></div><div>I don't know about using a marker to do what you want -- it can likely be done, but (?) On the other hand, if I understand correctly, there's a plus/minus symbol in font #34 (character "1"):</div><div><br></div><div> <a href="http://www.ncl.ucar.edu/Document/Graphics/Images/font34.png">http://www.ncl.ucar.edu/Document/Graphics/Images/font34.png</a></div><div><br></div><div>You'll need to use the "function code" notation to switch font's mid stream in a title:<br></div><div><br></div><div> <a href="http://www.ncl.ucar.edu/Applications/text.shtml">http://www.ncl.ucar.edu/Applications/text.shtml</a></div><div><br></div><div>Hope that helps...</div><div>Rick<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Nov 10, 2019 at 6:16 AM WUJIE via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi NCL experts,<div><br></div><div>Typically I use "gsn_text_ndc" to show some statistic metrics on the XY Plots, which is easy to do. However, for uncertainty purpose, one may need show " plus-minus sign” between two numbers. Does anyone can help how can I show the "<span style="line-height:14.4828px">plus-minus sign" with NCL? </span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px">I have tried this to make a </span><span style="line-height:14.4828px">"</span><span style="line-height:14.4828px">plus-minus sign"</span><span style="line-height:14.4828px">, which is learned from here: <a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/NhlNewMarker.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/NhlNewMarker.shtml</a> </span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px">;-----------------------------------------</span></div><div><div><span style="line-height:14.4828px"> mstring_tem = "1"</span></div><div><span style="line-height:14.4828px"> fontnum_tem = 34</span></div><div><span style="line-height:14.4828px"> xoffset_tem = 0.0</span></div><div><span style="line-height:14.4828px"> yoffset_tem = 0.0</span></div><div><span style="line-height:14.4828px"> ratio_tem = 1.0</span></div><div><span style="line-height:14.4828px"> size_tem = 1.0</span></div><div><span style="line-height:14.4828px"> angle_tem = 0.0</span></div><div><span style="line-height:14.4828px"> plus_minus_sign = NhlNewMarker(wks, mstring_tem, fontnum_tem, xoffset_tem, yoffset_tem, ratio_tem, size_tem, angle_tem)</span></div></div><div><span style="line-height:14.4828px">;-----------------------------------------</span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px">I then learned that "</span><span style="line-height:14.4828px">plus_minus_sign" created by above lines is a number instead of a string, so </span><span style="line-height:14.4828px">below line cannot work</span><span style="line-height:14.4828px"> :</span></div><div><br></div><div><span style="line-height:14.4828px"> gsn_text_ndc(wks,"Slope = " + sprintf("%3.2f", rc)+plus_minus_sign+sprintf("%3.2f",std)</span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px">How can I transfer it to a string?</span><span style="line-height:14.4828px"></span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px">Thanks, </span></div><div><span style="line-height:14.4828px"><br></span></div><div><span style="line-height:14.4828px">Jie</span></div>_______________________________________________<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/mailman/listinfo/ncl-talk</a></blockquote></div></div>