<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Lin,</div><div>You are correct, you cannot raster fill and pattern fill at the same time. However, I remembered that I replied to someone with this issue in April. See the response here: </div><div><a href="http://mailman.ucar.edu/pipermail/ncl-talk/2015-April/002370.html">http://mailman.ucar.edu/pipermail/ncl-talk/2015-April/002370.html</a></div><div>In short: you need to manipulate the values of the boxes that are not hatched so that the pattern fill only covers the boxes that you want. Note in the example coding that the user had _FillValue(s); you may or may not have that set for the boxes you do not want pattern filled.</div><div><br></div><div>The above referenced method requires trial and error, but it is possible to do what you want.</div><div><br></div><div>An alternative to the above would be to make many calls to gsn_add_polyline, drawing a line across each grid box, but that method may be intensive to implement as well.</div><div><br></div><div>Good luck. If you have any other inquires please respond to ncl-talk.</div><div>Adam</div><div><br>On Aug 21, 2015, at 10:05 PM, xianglin72 <<a href="mailto:xianglin72@icloud.com">xianglin72@icloud.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div style="font:14px/1.5 'Lucida Grande', '微软雅黑';color:#333;"><p style="font:14px/1.5 'Lucida Grande';margin:0;">Hi, Adam</p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><br></p><p style="font:14px/1.5 'Lucida Grande';margin:0;"> Thank you the reply. I've tried what you have told before sending the first mail( see the attached script), however, I can not get what you and I expect ( see the attached plot).</p><p style="font:14px/1.5 'Lucida Grande';margin:0;"> I've checked the explaination on the resource of "raster fill", and found the following :</p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="line-height: 1.5; "><br></span></p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="line-height: 1.5; "> </span><span style="font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; ">The following resources can be used to control fill features when</span><span style="font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; "> </span><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnFillMode" style="font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnFillMode</em></a><span style="font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; "> </span><span style="font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; ">is set to</span><span style="font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; "> </span><code style="font-size: 13px; line-height: 16px; text-align: left; margin: 0pt; padding: 0pt; ">RasterFill</code><span style="font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; ">:</span></p><ul style="margin: 0px 0px 5px; padding: 0pt; list-style-position: inside; color: rgb(0, 0, 0); font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; text-align: left; "><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnFillColors" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnFillColors</em></a></li><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnGridBoundFillColor" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnGridBoundFillColor</em></a></li><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnMissingValFillColor" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnMissingValFillColor</em></a></li><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnOutOfRangeFillColor" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnOutOfRangeFillColor</em></a></li><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnRasterSmoothingOn" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnRasterSmoothingOn</em></a></li><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnRasterMinCellSizeF" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnRasterMinCellSizeF</em></a></li><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnRasterSampleFactorF" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><em style="margin: 0pt; padding: 0pt;">cnRasterSampleFactorF</em></a></li><li style="margin: 0px; padding: 0px 0px 0px 25px; font-size: 10pt; line-height: 12pt; color: rgb(51, 51, 51); text-indent: -1em;"><em style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); "><a indepth="true" href="file:///Users/linx/Downloads/web/data/20140504112024/cn.html#cnRasterCellSizeF" style="margin: 0pt; padding: 0pt; text-decoration: none; color: rgb(133, 45, 133); ">cnRasterCellSizeF</a></em></li></ul><div style="text-align: left; text-indent: -13px;"><font face="verdana, sans-serif"><span style="font-size: 13px; line-height: 16px;"><br></span></font></div><p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="line-height: 1.5; "> So you can find that the cnMonoFillColor and cnFillPattern can not work for this mode, which I've said in the first mail.</span></p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="line-height: 1.5; "><br></span></p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="line-height: 1.5; "> Since the "AreaFill" mode can not get the same effect and the "</span><span style="line-height: 1.5; ">cnFillPattern" resource can not be used for "CellFill" and</span></p><p style="font:14px/1.5 'Lucida Grande';margin:0;">"rasterfill" mode, I still don't know how to add some shading effect for the chosen raster grids. </p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><br></p><p style="font:14px/1.5 'Lucida Grande';margin:0;">Thanks</p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><br></p><p style="font:14px/1.5 'Lucida Grande';margin:0;">Lin</p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="line-height: 1.5; "><br></span></p><p style="font:14px/1.5 'Lucida Grande';margin:0;"><span style="line-height: 1.5; "> </span></p><span style="font: 14px/1.5 'Lucida Grande';color:#333;"><br></span><div class="foxmail_blockquote_fromhere_element" style="font: 12px/1.5 'Lucida Grande';padding:2px 0 2px 0;"><span style="color:#333;text-decoration:line-through;white-space:pre-wrap;"> </span> 原始邮件 <span style="color:#333;text-decoration:line-through;white-space:pre-wrap;"> </span></div><div style="font: 12px/1.5 'Lucida Grande';background:#efefef;color:#666666;padding:8px;"><div><b style="color:#999;">发件人:</b> Adam Phillips<<a href="mailto:asphilli@ucar.edu">asphilli@ucar.edu</a>></div><div><b style="color:#999;">收件人:</b> xianglin72<<a href="mailto:xianglin72@icloud.com">xianglin72@icloud.com</a>></div><div><b style="color:#999;">抄送:</b> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a>></div><div><b style="color:#999;">发送时间:</b> 2015年8月22日(周六) 02:19</div><div><b style="color:#999;">主题:</b> Re: [ncl-talk] Could I add some FillPatterns effect such as obliquelines to a raster fill plot ?</div></div><br><div class="mail_quote_9B0F096918EC46368337B4E19E4FB53D" style="font: 14px/1.5 'Lucida Grande';color:#333;"><div dir="ltr"><div><div><div><div><div><div><div><div>Hi Lin,<br></div>You can always do an overlay where you create two images:<br></div>1) Create a RasterFill plot with colors. (You already have this plot.)<br></div>2) Create a RasterFill plot with pattern fill (not color fill).<br><br></div>Then you would overlay 2) on 1) using the overlay procedure. <br><br></div>See example #10 here:<br><a href="http://www.ncl.ucar.edu/Applications/overlay.shtml#ex10">http://www.ncl.ucar.edu/Applications/overlay.shtml#ex10</a><br><br></div>Note that for plot 2) (or plot_shade in example 10) you<span style="font-family:arial,helvetica,sans-serif"> would want to set the following resources:<br></span></div><span style="font-family:arial,helvetica,sans-serif">res@cnFillPattern = 3 <br></span></div><span style="font-family:arial,helvetica,sans-serif">res@cnMonoFillColor = True<br></span><div><div>res@lbLabelBarOn = False ; no labelbar needed<br></div><div><br>Available fill patterns:<br><a href="http://www.ncl.ucar.edu/Document/Graphics/Images/fillpatterns.png">http://www.ncl.ucar.edu/Document/Graphics/Images/fillpatterns.png</a><div><br></div><div>Hope that helps. If not, please respond to ncl-talk.<br></div><div>Adam<br></div><div><br><br><br></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 21, 2015 at 8:44 AM, xianglin72 <span dir="ltr"><<a href="mailto:xianglin72@icloud.com" target="_blank">xianglin72@icloud.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font:14px/1.5 'Lucida Grande','\005fae\008f6f\0096c5\009ed1';color:#333"><p style="font:14px/1.5 'Lucida Grande';margin:0"></p><p style="line-height:1.5;text-align:left;margin:0px">Hi, all</p><p style="line-height:1.5;text-align:left;margin:0px"><br style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important"></p><p style="line-height:1.5;text-align:left;margin:0px"> I've made a raster fill plot ( see the attachment), and I want to add some FillPattern effect for some chosen cells in the plot.</p><p style="line-height:1.5;text-align:left;margin:0px"><br style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important"></p><p style="line-height:1.5;text-align:left;margin:0px">However, I found that the resource of cnFillPattern can not work for the raster fill plot. How could I do to add some effect, </p><p style="line-height:1.5;text-align:left;margin:0px"><br style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important"></p><p style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;text-align:left;margin:0px"><font face="Lucida Grande"><span style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important;line-height:1.5">for example, some oblique lines to the chosen </span></font><font face="Lucida Grande">rectanglar cells? </font></p><p style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;text-align:left;margin:0px"><font face="Lucida Grande"><br style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important"></font></p><p style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;text-align:left;margin:0px"><font face="Lucida Grande"><br style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important"></font></p><p style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;text-align:left;margin:0px"><font face="Lucida Grande">Thanks</font></p><p style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;text-align:left;margin:0px"><font face="Lucida Grande"><br style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important"></font></p><p style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;text-align:left;margin:0px"><font face="Lucida Grande"><br style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif!important"></font></p><p style="font-family:'Lucida Grande','Lucida Sans Unicode',sans-serif;text-align:left;margin:0px"><font face="Lucida Grande">Lin</font></p><p></p></div><br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">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>
<br></blockquote></div><br><br clear="all"><br>-- <br><div 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>
</div>
</div></div></div></blockquote><blockquote type="cite"><div><test2.eps></div></blockquote><blockquote type="cite"><div><dtr_sat_raster.ncl></div></blockquote></body></html>