<div dir="ltr">Does your shapefile have the names of the regions for each polygon in your shapefile (and is your shapefile indeed a polygonal, vs. a polyline, shapefile)?<div><br></div><div>If so, shapefiles_1.ncl would still serve as a starting point, where the "data" is the name, not some derived value. I'd set up a table of region-name/colors, and as each polygon is drawn in turn, consult that table for the name to get/set the associated color.</div><div><br></div><div>Rick</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 15, 2018 at 11:08 AM, Tabish Ansari <span dir="ltr"><<a href="mailto:tabishumaransari@gmail.com" target="_blank">tabishumaransari@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"><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Hi<br><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">I want to draw a map of Northern China with with specific colors for each district based on its name.<br><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">How can I do it using shapefile polygons?<br><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">There's an example on the US with unemployment data here:<br><a href="https://www.ncl.ucar.edu/Applications/Scripts/shapefiles_1.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/<wbr>shapefiles_1.ncl</a><br><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">but I don't have any data to plot but only the districts with different colors based on their name.<br><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Thanks<br><br></div><div class="gmail_default" style="font-family:"trebuchet ms",sans-serif">Tabish<br><br clear="all"></div><div><div class="gmail-m_7090229426276208869gmail_signature"><div dir="ltr"><div><div><font size="1"><span style="font-family:tahoma,sans-serif">Tabish U Ansari<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">PhD student, Lancaster Environment Center<br></span></font></div><font size="1"><span style="font-family:tahoma,sans-serif">Lancaster Univeristy<br> <span>Bailrigg</span>, <span>Lancaster</span>, <br><span>LA1 4YW</span>, <span>United Kingdom</span></span></font><br></div></div></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>