<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">http://ncl.ucar.edu/Applications/labelbar.shtml</a><br></div><br>Rick<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">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><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Forgot to Cc ncl-talk...I apologize!<div><div class="h5"><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>_______________________________________________<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/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>