<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Qingyun and Adam,<br>
    <br>
    there is a resource called <b>gsFillDotSizeF</b> to change the size
    of the fillpattern dots (index 17) and <b>gsFillLineThicknessF</b>
    for fillpattern line to change the thickness of the lines. The
    following example demonstrate how to change the size and thickness.<br>
    <br>
    <font color="#3333ff"><tt>   wks =
        gsn_open_wks("x11","plot_change_fillpattern_scale")</tt><tt><br>
      </tt><tt><br>
      </tt><tt>   res                       =  True</tt><tt><br>
      </tt><tt>   res@gsLineColor           = "black"</tt><tt><br>
      </tt><tt>   res@gsFillColor           = "black"</tt><tt><br>
      </tt><tt>   res@tiMainString          = "NCL: plot fill pattern"</tt><tt><br>
      </tt><tt><br>
      </tt><tt>   txres                     =  True</tt><tt><br>
      </tt><tt>   txres@txFontHeightF       =  0.012</tt><tt><br>
      </tt><tt>   txres@txFontThicknessF    =  3.0</tt><tt><br>
      </tt><tt>   txres@txJust              = "CenterRight"</tt><tt><br>
      </tt><tt><br>
      </tt><tt>   x  = (/0.15, 0.85, 0.85, 0.15, 0.15/)</tt><tt><br>
      </tt><tt>   y  = (/0.025, 0.025, 0.05, 0.05, 0.025/)</tt><tt><br>
      </tt><tt>   dy = 0.05</tt><tt><br>
      </tt><tt>   t  = 0.0375</tt><tt><br>
      </tt><tt><br>
      </tt><tt>   dot_size  = 0.0001</tt><tt><br>
      </tt><tt>   fill_line = 1.0</tt><tt><br>
      </tt><tt>   </tt><tt><br>
      </tt><tt>   do i=1,18</tt><tt><br>
      </tt><tt>      res@gsFillIndex   =  17</tt><tt><br>
      </tt><tt>      res@gsFillDotSizeF        =  dot_size</tt><tt><br>
      </tt><tt>      gsn_polyline_ndc(wks, x, y+(i*dy), res)</tt><tt><br>
      </tt><tt>      gsn_polygon_ndc(wks, x, y+(i*dy), res)</tt><tt><br>
      </tt><tt>      gsn_text_ndc(wks, "i = "+ (i-1), 0.15-0.02,
        (i*dy)+t, txres)</tt><tt><br>
      </tt><tt>      dot_size  = dot_size + 0.0005</tt><tt><br>
      </tt><tt>   end do</tt><tt><br>
      </tt><tt><br>
      </tt><tt>   frame(wks)</tt><tt><br>
      </tt><tt><br>
      </tt><tt>   do i=1,18</tt><tt><br>
      </tt><tt>      res@gsFillIndex   =  9</tt><tt><br>
      </tt><tt>      res@gsFillLineThicknessF  =  fill_line</tt><tt><br>
      </tt><tt>      gsn_polyline_ndc(wks, x, y+(i*dy), res)</tt><tt><br>
      </tt><tt>      gsn_polygon_ndc(wks, x, y+(i*dy), res)</tt><tt><br>
      </tt><tt>      gsn_text_ndc(wks, "i = "+ (i-1), 0.15-0.02,
        (i*dy)+t, txres)</tt><tt><br>
      </tt><tt>      fill_line = fill_line + 0.3</tt><tt><br>
      </tt><tt>   end do</tt><tt><br>
      </tt><tt><br>
      </tt><tt>   frame(wks)</tt></font><br>
    <br>
    Bye<br>
    Karin<br>
    <br>
    <div class="moz-cite-prefix">Am 13.05.19 um 23:47 schrieb Adam
      Phillips:<br>
    </div>
    <blockquote type="cite"
cite="mid:CACvWuqCEocL+JgBaq1yZ5mOMiGJrhwVe5HWCup+t2OnAgDC0fA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
            moz-do-not-send="true">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"
            moz-do-not-send="true">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"
            moz-do-not-send="true">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" moz-do-not-send="true">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"
              moz-do-not-send="true">res@gsnMaximize</a>       =
            True          ; maximize size in frame<br>
            <a href="mailto:res@gsnDraw" target="_blank"
              moz-do-not-send="true">res@gsnDraw</a>             =
            False         ; Don't draw plots<br>
            <a href="mailto:res@gsnFrame" target="_blank"
              moz-do-not-send="true">res@gsnFrame</a>            =
            False         ; Don't advance frame<br>
            <a href="mailto:res@mpFillOn" target="_blank"
              moz-do-not-send="true">res@mpFillOn</a> = False<br>
            <a href="mailto:res@cnFillOn" target="_blank"
              moz-do-not-send="true">res@cnFillOn</a>            =
            True          ; Turn on contour fill<br>
            <a href="mailto:res@cnLinesOn" target="_blank"
              moz-do-not-send="true">res@cnLinesOn</a>           =
            False         ; Turn off contour lines<br>
            <a href="mailto:res@cnLevelSelectionMode" target="_blank"
              moz-do-not-send="true">res@cnLevelSelectionMode</a> =
            "ExplicitLevels"<br>
            <a href="mailto:res@cnLevels" target="_blank"
              moz-do-not-send="true">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"
              moz-do-not-send="true">res@cnFillColors</a> =
            (/2,18,50,82,114,141,178,194,226,248/)<br>
            <a href="mailto:res@mpMinLonF" target="_blank"
              moz-do-not-send="true">res@mpMinLonF</a> = 67    ;TP<br>
            <a href="mailto:res@mpMaxLonF" target="_blank"
              moz-do-not-send="true">res@mpMaxLonF</a> = 105<br>
            <a href="mailto:res@mpMinLatF" target="_blank"
              moz-do-not-send="true">res@mpMinLatF</a> = 25<br>
            <a href="mailto:res@mpMaxLatF" target="_blank"
              moz-do-not-send="true">res@mpMaxLatF</a> = 40<br>
            <a href="mailto:res@gsnAddCyclic" target="_blank"
              moz-do-not-send="true">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"
              moz-do-not-send="true">lnres@gsLineColor</a>      =
            "black"<br>
            <a href="mailto:lnres@gsLineThicknessF" target="_blank"
              moz-do-not-send="true">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"
              moz-do-not-send="true">res@cnLevels</a>)<br>
            <a href="mailto:res@cnMonoFillColor" target="_blank"
              moz-do-not-send="true">res@cnMonoFillColor</a>   = True<br>
            <a href="mailto:res@cnLevels" target="_blank"
              moz-do-not-send="true">res@cnLevels</a> = (/0.05,0.2/)<br>
            <a href="mailto:res@cnMonoFillPattern" target="_blank"
              moz-do-not-send="true">res@cnMonoFillPattern</a> =
            False     ; Use multiple fill patterns<br>
            <a href="mailto:res@cnFillPatterns" target="_blank"
              moz-do-not-send="true">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" moz-do-not-send="true"><strong>res@cnMonoLineThickness</strong></a><strong>
              = True ;<br>
            </strong><a href="mailto:res@cnLineThicknessF"
              target="_blank" moz-do-not-send="true"><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" moz-do-not-send="true"><strong><u><font
                    color="#0066cc">res@cnMonoLineThickness</font></u></strong></a><strong>
              = True ;<br>
            </strong><a href="mailto:res@cnLineThicknessF"
              target="_blank" moz-do-not-send="true"><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" moz-do-not-send="true">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"
              moz-do-not-send="true">bianqy@tea.ac.cn</a>><br>
            <b>Cc:</b> Ncl-talk <<a href="mailto:ncl-talk@ucar.edu"
              target="_blank" moz-do-not-send="true">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"
                  moz-do-not-send="true">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" moz-do-not-send="true">res@cnLevels</a> = (/0.05,0.2/)
<a href="mailto:res@cnMonoFillPattern" target="_blank" moz-do-not-send="true">res@cnMonoFillPattern</a> = False        ; Use multiple fill patterns
<a href="mailto:res@cnFillPatterns" target="_blank" moz-do-not-send="true">res@cnFillPatterns</a> = (/1,2,3/)   ;predefined fill pattern 1, 2 and 3
<a href="mailto:res@cnMonoFillColor" target="_blank" moz-do-not-send="true">res@cnMonoFillColor</a>   = True         ; Use same color for shading
<a href="mailto:res@lbLabelBarOn" target="_blank" moz-do-not-send="true">res@lbLabelBarOn</a> = False
</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" moz-do-not-send="true">res@cnMonoLineThickness</a> = True
<a href="mailto:res@cnLineThicknessF" target="_blank" moz-do-not-send="true">res@cnLineThicknessF</a> = 6

<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">
</pre>
                <span></span>_______________________________________________<br>
                ncl-talk mailing list<br>
                <a href="mailto:ncl-talk@ucar.edu" target="_blank"
                  moz-do-not-send="true">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"
                  moz-do-not-send="true">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"
                                    moz-do-not-send="true">www.cgd.ucar.edu/staff/asphilli/</a>  
                                </font></span><span><font
                                  color="#888888">303-497-1726 </font></span></div>
                            <span></span>
                            <div>
                              <div><span><font color="#888888"><br>
                                  </font></span>
                                <div><span></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" moz-do-not-send="true">www.cgd.ucar.edu/staff/asphilli/</a>  
                          </font></span><span><font color="#888888">303-497-1726
                          </font></span></div>
                      <span></span>
                      <div>
                        <div><span><font color="#888888"><br>
                            </font></span>
                          <div><span></span></div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
ncl-talk mailing list
<a class="moz-txt-link-abbreviated" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>
List instructions, subscriber options, unsubscribe:
<a class="moz-txt-link-freetext" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </blockquote>
  </body>
</html>