Re: distinguish states with color legends

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Wed Mar 16 2011 - 17:54:23 MDT

Hi Mark,

(1) The problem is that not only is there a state called "Texas", there are also counties in Oklahoma and in Missouri called "Texas". If the name is not further qualified all entities that have that name will get drawn. If you look at you will see that each element of the "Earth..4" dataset is contained in a hierarchical representation starting with the two top level elements "Land" and "Water". The state of Texas has this "fully qualified" hierarchical representation:

Land : North America : United States . Conterminous US : Texas

You could use the complete specification, but the part in bold is the minimum part of the hierarchy needed to specify this entity uniquely. Knowing this you simply need to change the line:

res@mpFillAreaSpecifiers = (/"Texas","Oklahoma"/)
res@mpFillAreaSpecifiers = (/"Conterminous US : Texas","Oklahoma"/)

to get the results you are expecting.

(2) The various map mpDataBaseVersion values are based on very different kinds of data, and are organized very differently as well. The HighRes database contains only coastline data so it is not possible to use it for state or national boundaries. Also it requires you to download some external files yourself. See

(3) See example maponly_6.ncl at


On Mar 16, 2011, at 4:15 PM, Mark Chan wrote:

> NCL users,
> The attached is a NCL example script for two US states.
> (1) Texas cover more area than it should be, what error could there exist?
> (2) How to employ high resolution data, e.g. [res@mpDataBaseVersion =
> "HighRes"]?
> (3) Could one give a suggestion that each of states (could be more states) has
> different values (whatever meaning) and how to use a color legend to distinguish
> them based on the example script?
> Thanks a lot!
> Mark
> <two_states.ncl>_______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Wed Mar 16 17:54:28 2011

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2011 - 16:15:59 MDT