col.fun | R Documentation |
Choose a type of color that helps read the map nicely.
col.fun(
data,
color.index,
display = "hue",
na.fill = "#F4A460",
offset = 0,
col = "red"
)
data |
a numeric vector that should lie on the range of [0,1]. |
color.index |
an integer vector from inzshapemap object. |
display |
a character value, the method for display colors. It should be choosen by one of the following display method: "hcl","hue","heat","rainbow","terrain","topo","cm","gray","r","n","e". |
na.fill |
a character value that specify the color that use to fill the unmatch region/country. |
offset |
a numeric value within the range of [0,1] . |
col |
the color for fill the match region/country, it only needs to be specify if display = 'hue'. |
hcl,HCL Color Specification, whith c = 35 and l = 85 see hcl. hue, when display = 'hue', then the 'col' arg need to be specified. The alpha will depend on the data, see rgb. rainbow,terrain,topo,cm are the method from RColorBrewer. r,n , the color filled randomly expect n will fill the entire map even the region is unmatch. e, equal color for all matched region.
A color vector.
Jason Wen
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.