<div dir="ltr">Hi Qingyun,<div>If I understand what you are asking, you would like to change the thickness of the lines of the various fill patterns that you are using. Unfortunately, I do not believe that you can do this in NCL. See this previous ncl-talk reply from a NCL-developer:</div><div><a href="https://www.ncl.ucar.edu/Support/talk_archives/2013/2900.html">https://www.ncl.ucar.edu/Support/talk_archives/2013/2900.html</a></div><div>Also, see the original questioner's response to the above on how they got the line thicknesses to change:</div><div><a href="https://www.ncl.ucar.edu/Support/talk_archives/2013/2885.html">https://www.ncl.ucar.edu/Support/talk_archives/2013/2885.html</a><br></div><div><br></div><div>Hope that helps!</div><div>Adam</div><div><br></div><div> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 2:10 PM Bian Qingyun <<a href="mailto:bianqy@tea.ac.cn">bianqy@tea.ac.cn</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"><p><br></p><p>Hi Adam,</p><p>Thank you for your suggestion! Attached is the figure. Here is my script.</p><p>;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</p><p>load "./shapefile_utils.ncl"<br>begin</p><p>;---read data<br>dir = "../data/"<br>fin = addfile(dir+"<a href="http://data_num_2001.nc" target="_blank">data_num_2001.nc</a>","r") ;---edit<br>lat = fin->lat<br>lon = fin->lonp = 1 - fin->p(0,:,:)<br>R = fin->p(1,:,:)<br></p><p>;---plot<br>type = "x11" ;----- edit -----<br>wks = gsn_open_wks(type,"png_panel_snowh_trend_vsstation_1980-2009_yearly")<br>gsn_define_colormap(wks,"ncl_default")<br><br>;---resources for color-filled plot<br>res = True<br><a href="mailto:res@gsnMaximize" target="_blank">res@gsnMaximize</a> = True ; maximize size in frame<br><a href="mailto:res@gsnDraw" target="_blank">res@gsnDraw</a> = False ; Don't draw plots<br><a href="mailto:res@gsnFrame" target="_blank">res@gsnFrame</a> = False ; Don't advance frame<br><a href="mailto:res@mpFillOn" target="_blank">res@mpFillOn</a> = False<br><a href="mailto:res@cnFillOn" target="_blank">res@cnFillOn</a> = True ; Turn on contour fill<br><a href="mailto:res@cnLinesOn" target="_blank">res@cnLinesOn</a> = False ; Turn off contour lines<br><a href="mailto:res@cnLevelSelectionMode" target="_blank">res@cnLevelSelectionMode</a> = "ExplicitLevels"<br><a href="mailto:res@cnLevels" target="_blank">res@cnLevels</a> = (/-0.2,-0.1,-0.05,-0.02,0,0.02,0.05,0.1,0.2/)<br><a href="mailto:res@cnFillColors" target="_blank">res@cnFillColors</a> = (/2,18,50,82,114,141,178,194,226,248/)<br><a href="mailto:res@mpMinLonF" target="_blank">res@mpMinLonF</a> = 67 ;TP<br><a href="mailto:res@mpMaxLonF" target="_blank">res@mpMaxLonF</a> = 105<br><a href="mailto:res@mpMinLatF" target="_blank">res@mpMinLatF</a> = 25<br><a href="mailto:res@mpMaxLatF" target="_blank">res@mpMaxLatF</a> = 40<br><a href="mailto:res@gsnAddCyclic" target="_blank">res@gsnAddCyclic</a> = False</p><p>;---resources for polyline<br>shp_filename = "TibetanPlateau.shp"<br>lnres = True<br><a href="mailto:lnres@gsLineColor" target="_blank">lnres@gsLineColor</a> = "black"<br><a href="mailto:lnres@gsLineThicknessF" target="_blank">lnres@gsLineThicknessF</a> = 3.0<br>;lnres@gsLineDashPattern = 13</p><p>;-----Open shapefile and read lat/lon values<br>data_mask_0 = shapefile_mask_data(R,shp_filename,True)<br>plot_fill = gsn_csm_contour_map(wks,data_mask_0,res) ; Create filled contours<br>line_mask_0 = gsn_add_shapefile_polylines(wks,plot_fill,shp_filename, lnres)</p><p>;---resources for shaded plot<br>delete(<a href="mailto:res@cnLevels" target="_blank">res@cnLevels</a>)<br><a href="mailto:res@cnMonoFillColor" target="_blank">res@cnMonoFillColor</a> = True<br><a href="mailto:res@cnLevels" target="_blank">res@cnLevels</a> = (/0.05,0.2/)<br><a href="mailto:res@cnMonoFillPattern" target="_blank">res@cnMonoFillPattern</a> = False ; Use multiple fill patterns<br><a href="mailto:res@cnFillPatterns" target="_blank">res@cnFillPatterns</a> = (/1,2,3/) ;fill with horizontal line, vertical line and slash</p><p><strong>;---change the thickness of the horizontal line, vertical line and slash<br></strong><a href="mailto:res@cnMonoLineThickness" target="_blank"><strong>res@cnMonoLineThickness</strong></a><strong> = True ;<br></strong><a href="mailto:res@cnLineThicknessF" target="_blank"><strong>res@cnLineThicknessF</strong></a><strong> = 4</strong></p><p>data_mask_1 = shapefile_mask_data(p,shp_filename,True)<br>plot_shade = gsn_csm_contour(wks,data_mask_1,res) ; Create shaded contours<br>line_mask_1 = gsn_add_shapefile_polylines(wks,plot_shade,shp_filename, lnres)</p><p>;---Overlay will transform plot_shade into data space of plot_fill<br>overlay(plot_fill,plot_shade)</p><p>;---This call resizes plot so it fits in frame<br>pres = True<br>maximize_output(wks,pres)</p><p>end</p><p>;;;;;;;;;;;;;;;;;;;;;;;;;</p><p>I want to make the line thicker in the shaded plot using the following resources, but they didn't work.</p><p><strong>;---change the thickness of the horizontal line, vertical line and slash<br></strong><a href="mailto:res@cnMonoLineThickness" target="_blank"><strong><u><font color="#0066cc">res@cnMonoLineThickness</font></u></strong></a><strong> = True ;<br></strong><a href="mailto:res@cnLineThicknessF" target="_blank"><strong><u><font color="#0066cc">res@cnLineThicknessF</font></u></strong></a><strong> = 4</strong></p><p>I have no idea how to change the line thickness. Any suggestions are appreciated! </p><p>Best,</p><p>Qingyun
</p><p><br></p><blockquote class="gmail-m_7655867774611303564ReferenceQuote" style="padding-left:5px;margin-right:0px;margin-left:5px;border-left:2px solid rgb(182,182,182)" name="replyContent">-----Original Messages-----<br>
<b>From:</b><span id="gmail-m_7655867774611303564rc_from">"Adam Phillips" <<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>></span><br>
<b>Sent Time:</b><span id="gmail-m_7655867774611303564rc_senttime">2019-05-14 03:24:05 (Tuesday)</span><br>
<b>To:</b> "Bian Qingyun" <<a href="mailto:bianqy@tea.ac.cn" target="_blank">bianqy@tea.ac.cn</a>><br>
<b>Cc:</b> Ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
<b>Subject:</b> Re: [ncl-talk] How to change the line thickness of predefined fill patterns<br><br><div dir="ltr">Hi Qingyun,<div>Can you send along a simplified script and the resulting image to the ncl-talk list so everyone can see the issue? Doing that would make it easier for folks to assist. </div><div>Adam</div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Sun, May 12, 2019 at 8:05 PM Bian Qingyun <<a href="mailto:bianqy@tea.ac.cn" target="_blank">bianqy@tea.ac.cn</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left:1px solid rgb(204,204,204)"><p><br>Hello,</p><p>I overlay a shaded contour plot on a filled contour plot following overlay_10.ncl from the NCL website.</p><p>Here are the resources for the shaded plot.</p><pre style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-style:normal;font-weight:400;word-spacing:0px;white-space:pre-wrap;font-variant-ligatures:normal;font-variant-caps:normal;text-decoration-style:initial;text-decoration-color:initial">;---Resources for shaded plot</pre><pre style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-style:normal;font-weight:400;word-spacing:0px;white-space:pre-wrap;font-variant-ligatures:normal;font-variant-caps:normal;text-decoration-style:initial;text-decoration-color:initial"><a href="mailto:res@cnLevels" target="_blank">res@cnLevels</a> = (/0.05,0.2/)<br><a href="mailto:res@cnMonoFillPattern" target="_blank">res@cnMonoFillPattern</a> = False ; Use multiple fill patterns<br><a href="mailto:res@cnFillPatterns" target="_blank">res@cnFillPatterns</a> = (/1,2,3/) ;predefined fill pattern 1, 2 and 3<br><a href="mailto:res@cnMonoFillColor" target="_blank">res@cnMonoFillColor</a> = True ; Use same color for shading<br><a href="mailto:res@lbLabelBarOn" target="_blank">res@lbLabelBarOn</a> = False<br></pre><pre style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-style:normal;font-weight:400;word-spacing:0px;white-space:pre-wrap;font-variant-ligatures:normal;font-variant-caps:normal;text-decoration-style:initial;text-decoration-color:initial">The question is I want change the line thicknesses of the predefined fill pattern 1, 2 and 3. I add the following resources, but they didn't work. </pre><pre style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-style:normal;font-weight:400;word-spacing:0px;white-space:pre-wrap;font-variant-ligatures:normal;font-variant-caps:normal;text-decoration-style:initial;text-decoration-color:initial"><a href="mailto:res@cnMonoLineThickness" target="_blank">res@cnMonoLineThickness</a> = True<br><a href="mailto:res@cnLineThicknessF" target="_blank">res@cnLineThicknessF</a> = 6<br><br><p>Any suggestions are appreciated! </p><p>Best,</p><p>Qingyun
</p></pre><pre style="color:rgb(0,0,0);text-transform:none;text-indent:0px;letter-spacing:normal;font-style:normal;font-weight:400;word-spacing:0px;white-space:pre-wrap;font-variant-ligatures:normal;font-variant-caps:normal;text-decoration-style:initial;text-decoration-color:initial"><br></pre><span></span>_______________________________________________<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><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div class="gmail-m_7655867774611303564gmail_signature" dir="ltr"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>
</blockquote><br><span>--<br><p>-------------------------------------------------------</p>
<p>边晴云 中国科学院大气物理研究所</p>
<p>TEL:18710037107</p>
<p>★☆活着,其实就是活一种精神状态~~</p></span></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>