<div dir="ltr"><div><div>HI,<br><br></div>One possible way to do that would be, as you draw each marker, find out out where its center is in Normalized Coordinate Space (NDC, effective coordinates on the "page" ranging from 0 to 1), and a small offset to that and call gsn_text_ndc() to draw the label. So, using the newcolor_4 example, do <i>something like</i> (untested):<br><br><pre>do i=0,nlevels-2
    ii = ind(levels(i).le.dvals.and.dvals.lt.levels(i+1))
    
...
    dum_fill_opq(i) = gsn_add_polymarker(wks,map_opq,lon(ii),lat(ii),mkres)

;---Add outlines
<br></pre><pre>; ---Label the markers<br></pre><pre>    datatondc(map_opq, lon(ii), lat(ii), xNDC, yNDC)<br></pre><pre>    gsn_text_ndc(wks, map_opq, myMarkerLabels(ii), xNDC+xOffset, yNDC+yOffset, textRes)<br>...<br>    delete(ii)
  end do</pre>There are of course some details there you'll need to fill in (eg, myMarkerLabel, textRes, etc), but those two function calls will get you close. Also, with this simple scheme, there's the potential for overlapping labels if the markers are dense. But hopefully this will get you started.<br><br></div>Rick<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 15, 2018 at 10:29 AM, Manisha Ganeshan <span dir="ltr"><<a href="mailto:manisha.ganeshan86@gmail.com" target="_blank">manisha.ganeshan86@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">Dear NCL'ers,<div><br></div><div>I had a question w.r.t the example script "newcolor_4.ncl" under polygons, polymarkers, polylines, text. I was wondering how I might add a label identifying each colored marker. </div><div><br></div><div>Thanks,</div><div>Nisha<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div class="m_9024697950449995281gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Dr. Manisha Ganeshan<div>Universities Space Research Association</div><div>Maryland, U.S.A.</div></div></div>
</font></span></div></div>
<br>______________________________<wbr>_________________<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/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>