<div dir="ltr">Hi Debasish,<div>Make sure you are naming the return variables different names for each call to gsn_add_text. You stopped showing your gsn_add_text calls after the first set, but the second set should be:</div><div>dum4=gsn_add_text(wks,plot_A(0),strs(2),-38,50,txres)<br>dum5=gsn_add_text(wks,plot_A(0),strs(3),-36,40,txres)<br>res@gsnCenterString = labes(1)<br>plot_A(1) = gsn_csm_contour_map_ce (wks, msd2(:,:), res)<br></div><div>dum6 = ...</div><div>dum7 = ...</div><div><br></div><div>alternatively, set up a 2D array to hold everything:</div><div>dum = new((/12,5/),graphic)</div><div>plot_A(0) = gsn_csm_contour_map_ce (wks, msd1(:,:), res)<br>dum(0,0)=gsn_add_polymarker(wks,plot_A(0),lond,latd,mkres)<br>dum(0,1)=gsn_add_text(wks,plot_A(0),strs(0),-28,23,txres)<br>dum(0,2)=gsn_add_text(wks,plot_A(0),strs(1),-23,27,txres)<br>dum(0,3)=gsn_add_text(wks,plot_A(0),strs(2),-38,50,txres)<br>dum(0,4)=gsn_add_text(wks,plot_A(0),strs(3),-36,40,txres)<br></div><div>res@gsnCenterString = labes(1)<br>plot_A(1) = gsn_csm_contour_map_ce (wks, msd2(:,:), res)<br></div><div>dum(1,0)= ...<br></div><div>dum(1,1)= ...</div><div>...</div><div><br></div><div>Hope that helps!</div><div>Adam</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Nov 30, 2021 at 11:28 AM Debasish Hazra via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>I am trying to add gsn_add_txt and polymarks in panel plot of 12 figures with 1st figure will show locations and index of stations but in the final figure I am getting the circles but not texts in the figure itself. <br></div><div>Following is part of the code where I am setting up my ncl code to add polyres and txts. Any help on this would be appreciated.<br></div><div><br></div><div>res = True ; plot options desired<br> res@gsnAddCyclic = False<br> res@gsnMajorLatSpacing = 10 ; change maj lat tm spacing<br> res@gsnMajorLonSpacing = 20 <br></div><div>SNIP........<br></div><div>mkres = True<br> mkres@gsMarkerIndex = 17 ; Filled circle<br> mkres@gsMarkerSizeF = 0.02<br><br> latd = (/24.7,26.73, 49.09,38.43/)<br> lond = (/-26.95,-22.93,-38.02, -36.24/)<br> <br> polyres = True ; poly marker mods desired<br> polyres@gsMarkerIndex = 17 ; choose circle as polymarker<br> polyres@gsMarkerSizeF = 0.01 ; select size to avoid streaking<br> polyres@gsMarkerColor = (/"red"/) ; choose color<br><br> txres = True<br> txres@txFont = 19 ; Change the default font.<br> txres@txFontHeightF = 0.008 ; Set the font height.<br> txres@txJust = "TopLeft"<br> txres@txFontColor = "Black"<br>;; txres@txFont = "helvetica-bold"<br> txres@txFuncCode = "~"<br> strs = (/"1","2","3","4"/)<br><br> res@gsnCenterString = labes(0)<br> plot_A(0) = gsn_csm_contour_map_ce (wks, msd1(:,:), res)<br> dum1=gsn_add_polymarker(wks,plot_A(0),lond,latd,mkres)<br> dum2=gsn_add_text(wks,plot_A(0),strs(0),-28,23,txres)<br> dum3=gsn_add_text(wks,plot_A(0),strs(1),-23,27,txres)<br> dum4=gsn_add_text(wks,plot_A(0),strs(2),-38,50,txres)<br> dum5=gsn_add_text(wks,plot_A(0),strs(3),-36,40,txres)<br> res@gsnCenterString = labes(1)<br> plot_A(1) = gsn_csm_contour_map_ce (wks, msd2(:,:), res)</div><div>SNIP.......<br> gsn_panel(wks,plot_A,(/3,4/),pres1)<br><br>; draw(plot_A)<br> frame(wks)</div><div><br></div><div>Thanks</div><div>Debasish<br></div><div><br></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><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">303-497-1726 </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>