<div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Erika,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Whenever you call gsn_text or gsn_text_ndc, the text is drawn at that moment. This means if you draw anything later, it will likely be drawn on top of the text.</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">You try calling gsn_text_ndc after you call gsn_attach_plots, but you may need to adjust your string position and size.</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Wed, Aug 20, 2014 at 3:42 PM, Erika Folova <span dir="ltr"><<a href="mailto:e.folova@gmail.com" target="_blank">e.folova@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">Hallo,<div><br></div><div>I have a question,, why the text that I added on top of my polygons hid behind them..</div><div>can you suggest me why?</div><div><br></div><div>[SNIP]</div><div><br>
</div><div><div>ymin = new(3,float)</div><div> ymax = new(3,float)</div><div> do i=0,2</div><div> getvalues plot(i)</div><div> "trYMinF": ymin(i)</div><div> "trYMaxF": ymax(i)</div><div>
end getvalues</div><div> end do</div><div><br></div><div><br></div><div> xmin = (/1990,2060/)</div><div> xmax = (/2030,2099/)</div><div><br></div><div> xbars = (/ (/xmin(0), xmax(0), xmax(0), xmin(0), xmin(0)/), \</div>
<div> (/xmin(1), xmax(1), xmax(1), xmin(1), xmin(1)/)/)</div><div><br></div><div> ybars = (/ (/ymin(0),ymin(0),ymax(0),ymax(0),ymin(0)/), \</div><div> (/ymin(1),ymin(1),ymax(1),ymax(1),ymin(1)/), \</div>
<div> (/ymin(2),ymin(2),ymax(2),ymax(2),ymin(2)/)/)</div><div><br></div><div><br></div><div>;;;;;; Create the bars and attach to appropriate plot</div><div> gres = True</div><div> gres@gsFillColor = "gray95"</div>
<div><br></div><div> do i=0,1</div><div> do j=0,2</div><div> poly((i*4)+j) = gsn_add_polygon(wks,plot(j),xbars(i,:),ybars(j,:),gres)</div><div> end do</div><div> end do</div><div><br></div><div>; add text =========</div>
<div><br></div><div><b> txres = True</b></div><div><b> txres@txPerimOn = False</b></div><div><b> txres@txFontHeightF = 0.0085</b></div><div><b> txres@txBackgroundFillColor = "White"</b></div>
<div><b> txres@txPolyDrawOrder = "PreDraw"</b></div><div><b><br></b></div><div><b> 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@tval))+" ("+sprintf("%5.2f",rc2@tval) +")",0.235,0.915,txres)</b></div>
<div><br></div><div><br></div><div>; plot all</div><div>;===================</div><div><br></div><div> attachres1 = True</div><div> attachres1@gsnAttachPlotsXAxis = True</div><div> attachres1@gsnAttachBorderOn = False</div>
<div> attachres2 = True</div><div> attachres2@gsnAttachPlotsXAxis = True</div><div> attachres2@gsnAttachBorderOn = False</div><div><br></div><div> attachid1 = gsn_attach_plots(plot(0),plot(1:2),attachres1,attachres2)</div>
<div><br></div><div> pres = False ; No resources needed</div><div> maximize_output(wks,pres) ; Maximize plot on page</div></div><div><br></div></div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>