[ncl-talk] add text problem in Draw Order
Erika Folova
e.folova at gmail.com
Wed Aug 20 15:42:09 MDT 2014
Hallo,
I have a question,, why the text that I added on top of my polygons hid
behind them..
can you suggest me why?
[SNIP]
ymin = new(3,float)
ymax = new(3,float)
do i=0,2
getvalues plot(i)
"trYMinF": ymin(i)
"trYMaxF": ymax(i)
end getvalues
end do
xmin = (/1990,2060/)
xmax = (/2030,2099/)
xbars = (/ (/xmin(0), xmax(0), xmax(0), xmin(0), xmin(0)/), \
(/xmin(1), xmax(1), xmax(1), xmin(1), xmin(1)/)/)
ybars = (/ (/ymin(0),ymin(0),ymax(0),ymax(0),ymin(0)/), \
(/ymin(1),ymin(1),ymax(1),ymax(1),ymin(1)/), \
(/ymin(2),ymin(2),ymax(2),ymax(2),ymin(2)/)/)
;;;;;; Create the bars and attach to appropriate plot
gres = True
gres at gsFillColor = "gray95"
do i=0,1
do j=0,2
poly((i*4)+j) =
gsn_add_polygon(wks,plot(j),xbars(i,:),ybars(j,:),gres)
end do
end do
; add text =========
* txres = True*
* txres at txPerimOn = False*
* txres at txFontHeightF = 0.0085*
* txres at txBackgroundFillColor = "White"*
* txres at txPolyDrawOrder = "PreDraw"*
* gsn_text_ndc(wks,"Prob="+sprintf("%5.3f", prob1)+" ("+sprintf("%5.3f",
prob2)+"), T= "+sprintf("%5.3f", rc1*10)+" ("+sprintf("%5.3f", rc2*10)+")
~C~|tval|="+sprintf("%5.2f",abs(rc1 at tval))+" ("+sprintf("%5.2f",rc2 at tval)
+")",0.235,0.915,txres)*
; plot all
;===================
attachres1 = True
attachres1 at gsnAttachPlotsXAxis = True
attachres1 at gsnAttachBorderOn = False
attachres2 = True
attachres2 at gsnAttachPlotsXAxis = True
attachres2 at gsnAttachBorderOn = False
attachid1 = gsn_attach_plots(plot(0),plot(1:2),attachres1,attachres2)
pres = False ; No resources needed
maximize_output(wks,pres) ; Maximize plot on page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140821/63893add/attachment.html
More information about the ncl-talk
mailing list