<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Hi Mary (and all users),<br>
<br>
I was able to get it to work! Here is what worked for me in case it
helps anyone else in the future:<br>
<br>
Everything (contours, map, and polymakers) had to be set to
"PostDraw" and OLR set to "Draw" (the OLR plot has the map resources
attached to it). Prior to the overlay the polymarkers had to be
drawn to any plot except for the OLR plot (the last in the
overlay). So this is what worked for me:<br>
<br>
plot_ov(n) =
gsn_csm_vector(wks,composite_U(lags(l),:,:),composite_V(lags(l),:,:),res)<br>
plot_o(n) = gsn_csm_contour(wks,composite_PSI(lags(l),:,:),res3)<br>
plot_n(n) =
gsn_csm_contour(wks,composite_zonal(lags(l),:,:),res6) <br>
plot(n) =
gsn_csm_contour_map_ce(wks,composite_OLR(lags(l),:,:),res2)<br>
<br>
gsres = True<br>
gsres@gsMarkerColor = "black"<br>
gsres@gsMarkerThicknessF = 3.0<br>
gsres@tfPolyDrawOrder = "PostDraw"<br>
mark(n) = gsn_add_polymarker(wks,plot_ov(n),lon_max(lags(l)),
lat_max(lags(l)),gsres);<br>
<br>
overlay(plot_o(n),plot_n(n))<br>
overlay(plot_ov(n),plot_o(n))<br>
overlay(plot(n),plot_ov(n))<br>
<br>
Thank you again, Mary, for your time.<br>
<br>
Stephanie<br>
<br>
<br>
<br>
On 12/4/15 3:34 PM, Stephanie wrote:
<blockquote cite="mid:566214FD.2090703@atmos.colostate.edu"
type="cite">
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
Hi Mary,<br>
<br>
Thank you for your quick reply. I tried setting some to predraw
rather than draw, and no change. Here is my figure script, where
the map outline disappears with res2@mpOutlineDrawOrder = "Draw"
(as it is below). What I would like is the map outline to be
under all contours, vectors, and the polymarkers. <br>
<br>
Thank you!<br>
Stephanie<br>
<br>
wks = gsn_open_wks("eps" ,"Figure9")<br>
gsn_define_colormap(wks,"BlueWhiteOrangeRed")<br>
<br>
res2 = True<br>
res2@gsnDraw = False<br>
res2@gsnFrame = False <br>
res2@gsnAddCyclic = True<br>
res2@cnLineLabelsOn = False<br>
<br>
res6 = res2<br>
res3 = res2<br>
res4 = res2<br>
<br>
;-- map --<br>
res2@mpPerimOn = False <br>
res2@mpLimitMode = "LatLon"<br>
res2@mpMaxLatF = 80.<br>
res2@mpMinLatF = -15. <br>
res2@mpMinLonF = -300. <br>
res2@mpMaxLonF = 45.<br>
res2@mpCenterLonF = -130<br>
res2@tmXBLabelFontHeightF = 0.014 <br>
res2@tmYLLabelFontHeightF = 0.014 <br>
res2@mpFillOn = False<br>
res2@mpGeophysicalLineThicknessF = 1.3<br>
res2@mpGeophysicalLineColor = "steelblue4"<br>
res2@mpOutlineDrawOrder = "Draw"<br>
<br>
res2@tmXTOn = False ; Turn off tickmarks and
labels <br>
res2@tmYROn = False <br>
res2@mpShapeMode = "FreeAspect"<br>
res2@vpWidthF = 0.88 <br>
res2@vpHeightF = 0.38 <br>
<br>
res2@tmYLLabelsOn = False ; do not draw left
labels<br>
res2@tmYLOn = False ; no left
tickmarks<br>
res2@tmXBLabelsOn = False ; do not draw
bottom labels<br>
res2@tmXBOn = False ; no bottom
tickmarks<br>
<br>
;-- OLR --<br>
res2@cnFillOn = True ; color fill<br>
res2@cnLinesOn = False<br>
res2@gsnSpreadColors = True ; use full colormap<br>
res2@lbLabelBarOn = False<br>
res2@cnLevelSelectionMode = "ManualLevels" ; set manual contour
levels<br>
res2@cnMinLevelValF = -25 ; set min contour level<br>
res2@cnMaxLevelValF = 25<br>
res2@cnLevelSpacingF = 2.5 ; set contour interval<br>
res2@cnInfoLabelOn = False<br>
res2@cnFillDrawOrder = "Draw"<br>
<br>
;-- vectors --<br>
res = True<br>
res@gsnDraw = False<br>
res@gsnFrame = False <br>
res@gsnAddCyclic = True<br>
res@vcRefLengthF = 0.052 ; reference vector
length<br>
res@vcMinDistanceF = 0.025 ; thin the vectors<br>
res@vcLineArrowHeadMinSizeF = 0.0075 <br>
res@vcLineArrowHeadMaxSizeF = 0.0075 <br>
res@vcRefAnnoString2On = False<br>
res@vcRefAnnoPerimOn = False<br>
res@vcRefAnnoOrthogonalPosF = 0.2 ; move ref vector
up or down<br>
res@vcRefAnnoParallelPosF = 0.97 ; move ref
vector left or right<br>
res@vcRefAnnoFontHeightF = 0.015 ;font size of
reference vector number<br>
res@vcVectorDrawOrder = "Draw"<br>
<br>
;-- Streamfunction --<br>
res3@cnFillOn = False<br>
res3@cnLinesOn = True <br>
res3@cnLineThicknessF = 1.3<br>
res3@cnLineLabelsOn = False<br>
res3@gsnContourNegLineDashPattern = 1 ; sets negative
contours to dash pattern 1<br>
res3@cnLevelSelectionMode = "ManualLevels" ; set manual contour
levels<br>
res3@cnMinLevelValF = -275 ; set min contour level<br>
res3@cnMaxLevelValF = 275<br>
res3@cnLevelSpacingF = 15 ; set contour interval<br>
res3@cnInfoLabelOn = False <br>
res3@cnLineDrawOrder = "Draw"<br>
<br>
;-- Zonal Wind --<br>
res6@cnFillOn = False<br>
res6@cnLinesOn = True<br>
res6@cnLineThicknessF = 1.5<br>
res6@cnLineLabelsOn = False<br>
res6@cnMonoLineColor = False<br>
res6@cnLineColors = (/205,215,230,240,255/)<br>
<br>
res6@cnLevelSelectionMode = "ManualLevels" ; set manual contour
levels<br>
res6@cnMinLevelValF = 40 ; set min contour level<br>
res6@cnMaxLevelValF = 80<br>
res6@cnLevelSpacingF = 10 ; set contour interval<br>
res6@cnInfoLabelOn = False<br>
res6@cnLineDrawOrder = "Draw"<br>
<br>
; Create a panel of plots<br>
pres = True <br>
pres@gsnFrame = False<br>
pres@gsnPaperOrientation = "portrait"<br>
pres@gsnMaximize = True <br>
pres@gsnPanelBottom = 0.05<br>
pres@gsnPanelYWhiteSpacePercent = 6<br>
pres@gsnPanelXWhiteSpacePercent = 0<br>
pres@gsnPanelLabelBar = True <br>
pres@lbLabelFontHeightF = 0.008<br>
pres@pmLabelBarOrthogonalPosF = 0.04 ;moves it up and down<br>
<br>
pres@pmLabelBarWidthF = 0.5<br>
pres@pmLabelBarParallelPosF = 0.05<br>
pres@lbTitleOn = True ; turn on title<br>
pres@lbTitleString = "[W/m~S~2~N~]" ; title
string<br>
pres@lbTitlePosition = "Right" ; title position<br>
pres@lbTitleFontHeightF= .011 ; make title
smaller<br>
pres@lbTitleDirection = "Across" ; title direction<br>
pres@lbTitleJust = "CenterLeft"<br>
<br>
<br>
plot= new(8,graphic)<br>
plot_o= new(8,graphic)<br>
plot_ov = new(8,graphic)<br>
mark = new(8,graphic)<br>
plot_n = new(8,graphic)<br>
<br>
lags = (/6,10,14,18,22,26,30,34/)<br>
<br>
<br>
l = 0<br>
<br>
do n=0,dimsizes(lags)-1<br>
<br>
res@gsnLeftString = "Lag " + lag(lags(l))<br>
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:res@gsnLeftStringOrthogonalPosF=.02">res@gsnLeftStringOrthogonalPosF=.02</a><br>
res@txFontHeightF = 0.035<br>
<br>
if(n .le. 5) <br>
rf = 25.<br>
else<br>
rf = 55.<br>
end if<br>
<br>
if((n % 2) .eq. 0)<br>
res2@tmYLLabelsOn = True ; do not draw left
labels<br>
res2@tmYLOn = True ; no left
tickmarks<br>
<br>
res2@tmYLMode =
"Explicit" <br>
res2@tmYLValues = (/-15,0,15, 30,45,
60,75/) <br>
res2@tmYLLabels =
(/"15~S~o~N~S","0~S~o~N~","15~S~o~N~N","30~S~o~N~N","45~S~o~N~W","60~S~o~N~N","75~S~o~N~N"/)<br>
<br>
else<br>
<br>
res2@tmYLLabelsOn = False ; do not draw left
labels<br>
res2@tmYLOn = False ; no left
tickmarks<br>
<br>
end if<br>
<br>
if(n .gt. 5)<br>
res2@tmXBLabelsOn = True ; do not draw
bottom labels<br>
res2@tmXBOn = True<br>
<br>
res2@tmXBMode =
"Explicit" <br>
res2@tmXBValues = (/-270,-225,-180,-135, -90,-45, 0,
45/) <br>
res2@tmXBLabels =
(/"90~S~o~N~E","135~S~o~N~E","180~S~o~N~","135~S~o~N~W","90~S~o~N~W","45~S~o~N~W","0~S~o~N~","45~S~o~N~E"/)
<br>
<br>
end if<br>
<br>
;-- vectors --<br>
res@vcRefMagnitudeF = rf ; make vectors
larger<br>
res@vcRefAnnoOn = True<br>
res@vcRefAnnoString1 = rf + " m~S~2~N~/s~S~2~N~" <br>
<br>
if(n .eq. 5)<br>
res@vcRefAnnoOrthogonalPosF = 0.02 ; move ref
vector up or down<br>
else<br>
res@vcRefAnnoOrthogonalPosF = 0.2 ; move ref
vector up or down<br>
end if<br>
<br>
<br>
plot_ov(n) =
gsn_csm_vector(wks,composite_U(lags(l),:,:),composite_V(lags(l),:,:),res)<br>
plot_o(n) =
gsn_csm_contour(wks,composite_PSI(lags(l),:,:),res3)<br>
plot_n(n) =
gsn_csm_contour(wks,composite_zonal(lags(l),:,:),res6) <br>
plot(n) =
gsn_csm_contour_map_ce(wks,composite_OLR(lags(l),:,:),res2)<br>
<br>
<br>
overlay(plot_o(n),plot_n(n))<br>
overlay(plot_ov(n),plot_o(n))<br>
overlay(plot(n),plot_ov(n))<br>
<br>
gsres = True<br>
gsres@gsMarkerColor = "black"<br>
gsres@gsMarkerThicknessF = 3.0<br>
gsres@tfPolyDrawOrder = "PostDraw"<br>
mark(n) = gsn_add_polymarker(wks,plot(n),lon_max(lags(l)),
lat_max(lags(l)),gsres)<br>
<br>
<br>
<br>
l = l + 1<br>
end do<br>
<br>
gsn_panel(wks,plot, (/5,2/), pres)<br>
<br>
<br>
<br>
On 12/4/15 2:33 PM, Mary Haley wrote:
<blockquote
cite="mid:CACNN_CKQo4yd7tySbfXmskMpgdtJRWKa4Tdbv1wXL5y0kbFJMQ@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-size: small;">Stephanie,</div>
<div class="gmail_default" style="font-size: small;"><br>
</div>
<div class="gmail_default" style="font-size: small;">Can you
send us a script that shows what you are trying to do?</div>
<div class="gmail_default" style="font-size: small;"><br>
</div>
<div class="gmail_default" style="font-size: small;">I was
able to get the markers to appear on top of the map outlines
by setting:</div>
<div class="gmail_default" style="font-size: small;"><br>
</div>
<div class="gmail_default" style="font-size: small;">
<div class="gmail_default"> res@tfPolyDrawOrder =
"PostDraw"</div>
<div class="gmail_default"> res@mpOutlineDrawOrder = "Draw"</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">but I was only drawing maps and
markers, and no contours or vectors. Without knowing what
kind of plot elements you're drawing, I can't really
reproduce your problem.</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">It might be that you need to set
some of the other items to "predraw" rather than "draw".</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">--Mary</div>
<div class="gmail_default"><br>
</div>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Fri, Dec 4, 2015 at 1:26 PM,
Stephanie <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:sslade1@atmos.colostate.edu"
target="_blank">sslade1@atmos.colostate.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt
0.8ex; border-left: 1px solid rgb(204, 204, 204);
padding-left: 1ex;">Hi NCL users,<br>
<br>
I'm having trouble overlaying polymarkers in a figure so
that the<br>
polymarkers are on top of everything. My plot is a panel
plot with<br>
multiple overlays in each panel, and each panel has a
polymarker which<br>
is in a different location in each panel (so gsn_panel
has to be called<br>
after drawing the polymarkers). My main concern is that
the map outline<br>
sits on top of the polymarkers. I attempted to set the
draw order for<br>
each layer by setting everything to "Draw" and the
polymarkers to<br>
"PostDraw", however this caused the background map outline
to completely<br>
disappear with everything else in tact. Any suggestions
would be<br>
greatly appreciated.<br>
<br>
Thank you all in advance!<br>
<br>
Stephanie<br>
<br>
--<br>
Stephanie A. Henderson<br>
(Formerly Stephanie A. Slade)<br>
PhD Candidate<br>
Department of Atmospheric Science<br>
Colorado State University<br>
Fort Collins, CO 80523<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a moz-do-not-send="true" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a moz-do-not-send="true"
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>
</div>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Stephanie A. Henderson
(Formerly Stephanie A. Slade)
PhD Candidate
Department of Atmospheric Science
Colorado State University
Fort Collins, CO 80523</pre>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
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>
<br>
<br>
<pre class="moz-signature" cols="72">--
Stephanie A. Henderson
(Formerly Stephanie A. Slade)
PhD Candidate
Department of Atmospheric Science
Colorado State University
Fort Collins, CO 80523</pre>
</body>
</html>