[ncl-talk] Draw shapefile polygons with specific colors based on districts

Rick Brownrigg brownrig at ucar.edu
Tue May 15 11:42:29 MDT 2018


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)?

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.

Rick


On Tue, May 15, 2018 at 11:08 AM, Tabish Ansari <tabishumaransari at gmail.com>
wrote:

> Hi
>
> I want to draw a map of Northern China with with specific colors for each
> district based on its name.
>
> How can I do it using shapefile polygons?
>
> There's an example on the US with unemployment data here:
> https://www.ncl.ucar.edu/Applications/Scripts/shapefiles_1.ncl
>
> but I don't have any data to plot but only the districts with different
> colors based on their name.
>
> Thanks
>
> Tabish
>
> Tabish U Ansari
> PhD student, Lancaster Environment Center
> Lancaster Univeristy
> Bailrigg, Lancaster,
> LA1 4YW, United Kingdom
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180515/e52523af/attachment.html>


More information about the ncl-talk mailing list