<div dir="ltr"><div><div>Thank you Rick,<br><br></div>What I was referring to in my first question was to make a legend where the colors are defined in numerical values. That is "light blue" = 0.1 to 2, "yellow" 2-3, etc... The values I want to present are the Globalvalues of precipitation. Does that help?<br><br>I'll keep in touch if any further questions arise from the other suggestions you gave me. <br><br></div>Carlos<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 23, 2015 at 1:48 PM, Rick Brownrigg <span dir="ltr"><<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</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"><div><div><div><div><div>Hi Carlos,<br><br></div>As for your second question, I modified your script slightly; the script and snapshot are attached. The changes are:<br><br></div>- added mpDataBaseVersion = "MediumRes", which gives a slightly better looking map<br></div>- draw each polymarker twice, once with a solid-fill marker, then with an outline marker in black<br><br></div>I don't really understand your first question. The x and y values are n NDC (normalized idevice coordinates), which range from 0--1 across the longest dimension of your plot. Example 11 at the following link shows an example of i) getting the corners/edges of the plot boundary, and then constructing a label/legend in a particular corner of the plot. Perhaps this will guide, but please write back to the list if not.<br><br> <a href="http://ncl.ucar.edu/Applications/labelbar.shtml" target="_blank">http://ncl.ucar.edu/Applications/labelbar.shtml</a><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><br>Rick<br><br></font></span></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, Oct 21, 2015 at 6:33 PM, Carlos J. Valle-Diaz <span dir="ltr"><<a href="mailto:cj.vallediaz@gmail.com" target="_blank">cj.vallediaz@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Forgot to Cc ncl-talk...I apologize!<div><div><br><br><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Carlos J. Valle-Diaz</b> <span dir="ltr"><<a href="mailto:cj.vallediaz@gmail.com" target="_blank">cj.vallediaz@gmail.com</a>></span><br>Date: Wed, Oct 21, 2015 at 8:27 PM<br>Subject: Re: [ncl-talk] Help with creating a script for precipitation stored in shapefiles<br>To: Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>><br><br><div dir="ltr"><div><div><div><div>Thank you very much Rick,<br><br></div>I've been playing around with the script to understand the functions and resources used to make the plot and learn NCL from it. I managed to focus it on my area of interest (Puerto Rico). At the moment, I've been trying to put a legend and text. I've seen an example at the website "polyg_8.ncl", but I have a question.<br><br></div>I know that the gsn_polymarker_ndc(wks, x, y, res) function lets me put the legend markers and the gsn_text_ndc(wks, text, x, y, res) function lets me put the text. I'm using "gsres" as a resource for the polymarkers and "txres" as a resource for the text to go along with it. My question lies in the numeric values (x and y). In the example script I mentioned above, the code is set for an array set defined. In my case I would have to define it for the Globalvalues (precipitation) in my shapefile. In summary, how do I define x and y to make a legend at an even interval of my GlobalValues and to play with the location of both the markers and text? (See script attached)<br><br></div><div>Also, I've been trying to include black circles in the loop that generates the colored polymarkers in the plot to make it more visible, but haven't been succesful. I've tried the following sequence, for example, and marks an error. What am I doing wrong?<br></div><div><br> do i=0, dimsizes(f->Globvalue) - 1<br><br> indx = doubletoint( (f->Globvalue(i)-globMin) / globRange * numColors) + 1 ; skip first color in table<br> if (indx.ge.numColors) then<br> indx = numColors - 1<br> end if<br><br> gsres@gsMarkerIndex = 4<br> gsres@gsMarkerThicknessF = 2<br> gsres@gsMarkerColor = "Black"<br> gsn_polymarker(wks, plot, f->Lon(i), f->Lat(i), gsres)<br> gsres@gsMarkerIndex = 1<br> gsres@gsMarkerSizeF = 0.03<br> gsres@gsMarkerColor = cmap(indx, :)<br> gsn_polymarker(wks, plot, f->Lon(i), f->Lat(i), gsres)<br><br> end do<br><br></div>Thanks again,<br><br></div>Carlos<br></div><br></div></div></div></div></div>
<br></div></div><span class="">_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">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/mailman/listinfo/ncl-talk</a><br>
<br></span></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">Carlos J. Valle Diaz<br>Ph.D. Chemistry Student<br>University of Puerto Rico Rio Piedras Campus<div>Department of Graduate Chemistry and Environmental Sciences<br><a href="mailto:cj.vallediaz@gmail.com" target="_blank">cj.vallediaz@gmail.com</a></div><div>Tel. 787-764-0000 x88192<br></div></div></div></div></div>
</div>