<div dir="ltr"><div class="gmail_default" style="font-size:small">The white space is either due to missing values in your data, or you are using a larger lat/lon boundary that the lat/lon extent of your array. </div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">As a start, instead of hard-coding the lat/lon bounds with:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace"> latS = 40.</font></div><div class="gmail_default"><font face="monospace, monospace"> latN = 49.</font></div><div class="gmail_default"><font face="monospace, monospace"> lonL = -116.</font></div><div class="gmail_default"><font face="monospace, monospace"> lonR = -90.</font> </div></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">you can try using the lat/lon values associated with the "eof" array:</div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><br></font></div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"> latS = min(eof&lat)</font></div><div class="gmail_default" style="font-size:small"><div class="gmail_default"><font face="monospace, monospace"> latN = max(eof&lat)</font></div><div class="gmail_default"><font face="monospace, monospace"> lonL = min(eof&lon)</font></div><div class="gmail_default"><font face="monospace, monospace"> lonR = max(eof&lon)</font></div></div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 17, 2016 at 1:37 PM, Adv <span dir="ltr"><<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><br><div class="gmail_quote"><br><br><div dir="ltr"><div>Hi,<br></div><div>I don'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><span><br>latS = 40.<br> latN = 49.<br> lonL = -116.<br></span> lonR = -90.<br><br><br></div><div><div>wks = gsn_open_wks("pdf","eof")<br> gsn_define_colormap(wks,"BlWhRe") ; 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't draw yet<br> res@gsnFrame = False ; don'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 = "LatLon"<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's<br> res@mpPerimOn = True ; draw box around map<br>res@mpGeophysicalLineThicknessF = 3.0<br>res@mpGeophysicalLineColor = "Black"; (/22/)<br>;res@mpNationalLineThicknessF = 3.0<br>res@mpOutlineBoundarySets = "GeophysicalAndUSStates" ; 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 = "SLP: "+season+": "+yStrt+"-"+yLast<br><br>;*******************************************<br>; first plot<br>;*******************************************<br> do n=0,neof-1<br> res@gsnLeftString = "EOF "+(n+1)<br> res@gsnRightString = sprintf("%5.1f", eof@pcvar(n)) +"%"<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't draw yet<br> rts@gsnFrame = False ; don'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 = "mm/day" rts@gsnYRefLine = 0. ; reference line<br> rts@gsnXYBarChart = True ; create bar chart<br> rts@gsnAboveYRefLineColor = "red" ; above ref line fill red<br> rts@gsnBelowYRefLineColor = "blue" ; 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 = "Prec: "+season+": "+yStrt+"-"+yLast<br><br> year = yyyymm/100<br><br>; create individual plots<br> do n=0,neof-1<br> rts@gsnLeftString = "EOF "+(n+1)<br> rts@gsnRightString = sprintf("%5.1f", eof@pcvar(n)) +"%"<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></div>
</div><br></div>
</div><br></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>