<div dir="ltr">Hi all,<div><br></div><div>I&#39;m trying to come up with a routine thats produces a plot legend using a loop. However, my attempts to do so corrupts the text labels. See attached plot as an example. The code for this loop is:</div><div><br></div><div><div>  plabel = (/&quot;  ne30_old&quot;, \</div><div>             &quot;  ne30_new&quot;, \</div><div>             &quot;  ne60_old&quot;, \</div><div>             &quot;  ne60_new&quot;, \</div><div>             &quot;  ne120_old&quot;,\</div><div>             &quot;  ne120_new&quot;,\</div><div>             &quot;  ne240_old&quot;,\</div><div>             &quot;  ne240_new&quot;/)</div></div><div><br></div><div><div>  xx = (/1.,2.5/)</div><div>  yy = (/985.,978.,971.,964.,957.,950.,943.,936./)</div><div>  do n = 0,nfiles-1</div><div>    res_lines@gsLineColor       = colors(n)</div><div>    lstr = unique_string(&quot;rum&quot;)</div><div>    tstr = unique_string(&quot;hum&quot;)</div><div>    plot@$lstr$ = gsn_add_polyline(wks,plot(1),xx,(/yy(n),yy(n)/),res_lines) </div><div>    plot@$tstr$ = gsn_add_text(wks,plot(1),plabel(n),xx(1),yy,res_text)</div><div>  end do</div></div><div><br></div><div>Can anyone figure out why my legend labels are, what appears to be, &#39;doubly&#39; printed?</div><div><br></div><div>Adam</div></div>