<div dir="ltr"><div><div><div><div><div><div><div><div>Do a<br><br>  printVarSummary(eof)<br><br></div>Look at your min/max lat and lon coordinates associated with &#39;eof&#39;.<br></div>Do they match your specified map limite. I speculate not. NCL plots the region you specified. The data are placed in this region<br><br></div><div>Replace<br></div><div><br>  latS   =  40.<br>  latN   =  49.<br>  lonL   = -116.<br>  lonR   =  90.<br><br></div>  nlat = dimsizes(eof&amp;lat)    ; lat==&gt; whatever the coordinate name is<br></div>  mlon= dimsizes(eof&amp;lon)<br><br></div><div>With<br></div><div><br></div>  latS = eof&amp;lat(0)<br></div>  latN = eof&amp;lat(nlat-1)<br></div>  lonL = eof&amp;lon(0)<br></div>  lonR = eof&amp;lon(mlon-1)<br><br><br><div><div><div><div><div><div><div><br></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 3:31 PM, Adv <span dir="ltr">&lt;<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br></div>Thanks for your reply. I think my question is not clear. I would like to get rid of white spaces inside the boundary line, not outside. I don&#39;t understand why its happening here. I never seen it before.  Please help me to understand whats going on here. It looks quite awkward and it may confuse someone that white spaces are calculated EOF values, since color bar includes white color as well.<br></div>Thanks<br><div><br><br></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 2:51 PM, Adam Phillips <span dir="ltr">&lt;<a href="mailto:asphilli@ucar.edu" target="_blank">asphilli@ucar.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello,<div>As a reminder please do not double post unless your query has not been answered within 24 hours (Monday-Friday). </div><div><br></div><div>I was just able to use the utility convert to remove all white space around your .pdf file:</div><div>convert -trim +repage eof.pdf eof2.pdf<br></div><div><br></div><div>You will get a bounding box error as your second frame is blank but the newly created .pdf looks fine.</div><div><br></div><div>You can wrap this into a NCL script by deleting the workstation and using the system procedure:</div><div><br></div><div>plot = gsn_csm_contour_map(wks,.....</div><div>delete(wks)</div><div>system(&quot;convert -trim +repage eof.pdf eof2.pdf&quot;)</div><div>system(&quot;rm eof.pdf&quot;)</div><div>end</div><div><br></div><div>Hope that helps. If not, please respond to the ncl-talk email list.</div><div>Adam</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div>On Wed, Mar 16, 2016 at 8:57 PM, Adv <span dir="ltr">&lt;<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><br><div class="gmail_quote"><br><br><div dir="ltr"><div>Hi,<br></div><div>I don&#39;t know how to get rid of white spaces around the boundary. Could someone help me to fix this? I have attached a output figure for your review.<br></div><div><br></div><div>Thanks<br></div><div> <br></div><div><br>latS   =  40.<br>  latN   =  49.<br>  lonL   = -116.<br>  lonR   =  -90.<br><br><br></div>wks = gsn_open_wks(&quot;pdf&quot;,&quot;eof&quot;)<br>  gsn_define_colormap(wks,&quot;BlWhRe&quot;)       ; choose colormap<br>  plot = new(neof,graphic)                ; create graphic array<br>                                          ; only needed if paneling<br>; EOF patterns<br><br>  res                      = True<br>  res@gsnDraw              = False        ; don&#39;t draw yet<br>  res@gsnFrame             = False        ; don&#39;t advance frame yet<br><br>;---This resource not needed in V6.1.0<br>  res@gsnSpreadColors      = True         ; spread out color table<br><br>  res@gsnAddCyclic         = False        ; plotted dataa are not cyclic<br><br>  res@mpFillOn             = False        ; turn off map fill<br>res@mpLimitMode           = &quot;LatLon&quot;<br>  res@mpMinLatF            = latS         ; zoom in on map<br>  res@mpMaxLatF            = latN<br>  res@mpMinLonF            = lonL<br>  res@mpMaxLonF            = lonR<br> res@cnFillOn             = True         ; turn on color fill<br>  res@cnLinesOn            = False        ; True is default<br>;res@cnLineLabelsOn       = False        ; True is default<br>  res@lbLabelBarOn         = False        ; turn off individual lb&#39;s<br> res@mpPerimOn              = True                    ; draw box around map<br>res@mpGeophysicalLineThicknessF = 3.0<br>res@mpGeophysicalLineColor = &quot;Black&quot;; (/22/)<br>;res@mpNationalLineThicknessF  = 3.0<br>res@mpOutlineBoundarySets = &quot;GeophysicalAndUSStates&quot; ; add state boundaries<br>res@mpNationalLineColor  = res@mpGeophysicalLineColor<br>res@mpUSStateLineThicknessF = 3.0<br>res@mpUSStateLineColor  = res@mpGeophysicalLineColor<br><br><br>                                          ; set symmetric plot min/max<br>  symMinMaxPlt(eof, 16, False, res)       ; contributed.ncl<br>; panel plot only resources<br>  resP                     = True         ; modify the panel plot<br>  resP@gsnMaximize         = False         ; large format<br>  resP@gsnPanelLabelBar    = True         ; add common colorbar<br>  resP@lbLabelAutoStride   = True         ; auto stride on labels<br><br>  yStrt                    = yyyymm(0)/100<br>  yLast                    = yyyymm(nyrs-1)/100<br>;  resP@txString            = &quot;SLP: &quot;+season+&quot;: &quot;+yStrt+&quot;-&quot;+yLast<br><br>;*******************************************<br>; first plot<br>;*******************************************<br>  do n=0,neof-1<br>     res@gsnLeftString  = &quot;EOF &quot;+(n+1)<br>     res@gsnRightString = sprintf(&quot;%5.1f&quot;, eof@pcvar(n)) +&quot;%&quot;<br>     plot(n)=gsn_csm_contour_map_ce(wks,eof(n,:,:),res)<br>  end do<br>;*******************************************<br>; second plot<br>;*******************************************<br>; EOF time series  [bar form]<br><br>  rts           = True<br>  rts@gsnDraw   = False       ; don&#39;t draw yet<br>  rts@gsnFrame  = False       ; don&#39;t advance frame yet<br>  rts@gsnScale  = True        ; force text scaling<br><br>; these four rtsources allow the user to stretch the plot size, and<br>; decide exactly where on the page to draw it.<br><br>  rts@vpHeightF = 0.40        ; Changes the aspect ratio<br>  rts@vpWidthF  = 0.85<br>  rts@vpXF      = 0.10        ; change start locations<br>  rts@vpYF      = 0.75        ; the plot<br><br><br>  rts@tiYAxisString = &quot;mm/day&quot;     rts@gsnYRefLine           = 0.              ; reference line<br>  rts@gsnXYBarChart         = True            ; create bar chart<br>  rts@gsnAboveYRefLineColor = &quot;red&quot;           ; above ref line fill red<br>  rts@gsnBelowYRefLineColor = &quot;blue&quot;          ; below ref line fill blue<br><br>; panel plot only resources<br>  rtsP                      = True            ; modify the panel plot<br>  rtsP@gsnMaximize          = True            ; large format<br>  rtsP@txString             = &quot;Prec: &quot;+season+&quot;: &quot;+yStrt+&quot;-&quot;+yLast<br><br>  year = yyyymm/100<br><br>; create individual plots<br>  do n=0,neof-1<br>     rts@gsnLeftString  = &quot;EOF &quot;+(n+1)<br>     rts@gsnRightString = sprintf(&quot;%5.1f&quot;, eof@pcvar(n)) +&quot;%&quot;<br>     plot(n) = gsn_csm_xy (wks,year,eof_ts(n,:),rts)<br>  end do<br>  gsn_panel(wks,plot,(/neof,1/),rtsP)     ; now draw as one plot<br>end<br>     <br><br></div>
</div><br></div>
<br></div></div><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>
<br></span></blockquote></div><span><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><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"><a href="tel:303-497-1726" value="+13034971726" target="_blank">303-497-1726</a> </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>
</font></span></div>
</blockquote></div><br></div>
</div></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></div>