<div dir="ltr"><div><div><div><div><div>Hi Yun,<br></div>It looks to me like you are passing all your polymarker coordinates into each gsn_add_polymarker call and thus coloring them all at once. This would result in all polymarkers getting colored one color based on your last pmvalue index value.<br><br></div>Try changing this:<br>dum = gsn_add_polymarker(wks, plot, x, y, res_poly)<br></div><div>to this:<br>dum = gsn_add_polymarker(wks, plot, x(i), y(i), res_poly)<br></div><br></div>If that doesn&#39;t work let ncl-talk know.<br></div>Adam<br><div><div><div><div><div><div><br></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Mar 5, 2015 at 3:53 PM, Yun Yue <span dir="ltr">&lt;<a href="mailto:yunyue@huskers.unl.edu" target="_blank">yunyue@huskers.unl.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div dir="ltr">
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<p style="margin-top:0px;margin-bottom:0px"><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">Hi NCL users,<br>
</p>
<p style="margin-top:0px;margin-bottom:0px">I&#39;m trying to plot observation data to model simulated data map. I think I should use gsn_add_polymarker to overlay them. But for the @gsMarkerColor, I want use the same color for plotting simulated data map,
 so I tried to use code like the following. But I got black dots on the map. Can somebody help me to solve this? Thank you very much.<br>
</p>
<p style="margin-top:0px;margin-bottom:0px">Yun<br>
</p>
<p style="margin-top:0px;margin-bottom:0px">wks = gsn_open_wks(&quot;x11&quot;, &quot;overlay&quot;)<br>
</p>
<p style="margin-top:0px;margin-bottom:0px">gsn_define_colormap(wks,&quot;WhAqGrYeOrReVi200&quot;)<br>
</p>
<p style="margin-top:0px;margin-bottom:0px">cmap      = gsn_retrieve_colormap(wks)<br>
</p>
<p style="margin-top:0px;margin-bottom:0px"><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;background-color:rgb(255,255,255)">cnLevels = (/5,10,15,20,25,30</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;background-color:rgb(255,255,255)">/</span><span style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:16px;background-color:rgb(255,255,255)">)</span><br>
</p>
<p style="margin-top:0px;margin-bottom:0px">res_poly = True<br>
</p>
<p style="margin-top:0px;margin-bottom:0px">res_poly@gsMarkerIndex = 16<br>
</p>
<p style="margin-top:0px;margin-bottom:0px">res_poly@gsMarkerSizeF = 10   <br>
</p>
<p style="margin-top:0px;margin-bottom:0px">do i = 0, station_numb<br>
</p>
<p style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(255,0,0)">res_poly@gsMarkerColor = GetFillColor(cnLevels, cmap, pmvalue(i))</span><br>
</p>
<div>
<div style="font-size:12pt;color:#000000;background-color:#ffffff;font-family:Calibri,Arial,Helvetica,sans-serif">
<div name="divtagdefaultwrapper">
<div>dum = gsn_add_polymarker(wks, plot, x, y, res_poly)<br>
</div>
<div>str1  = unique_string(&quot;dum&quot;<span style="font-size:12pt">)</span></div>
<div><span style="font-size:12pt">plot@$str1$=dum</span></div>
<div><span style="font-size:12pt">end do</span></div>
<div><span style="font-size:12pt">draw (plot)</span></div>
<div><span style="font-size:12pt"><br>
</span></div>
<div><span style="font-size:12pt"><br>
</span></div>
<div><br>
</div>
<div><span style="font-size:12pt"><br>
</span></div>
</div>
</div>
</div>
</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><br clear="all"><br>-- <br><div class="gmail_signature"><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 Division, 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>