create and display a plot for a WorldMap object
a WorldMap object
a table, Matrix, Array, DataSeries, or DataFrame.
a list or one-dimensional Array or Matrix of country identifiers in the form of country names, ISO 3166 two- or three-letter country codes, or top level internet domain country codes. These name types may be mixed, and can be formatted as strings or names.
a list or one-dimensional Array or Matrix consisting of a data item for each country in countries, arranged in the same order
a DataSets[Builtin][Reference] object consisting of two columns
(optional) keyword options of the form option=value, where option can be colorlist, grid, markers, projection, transformdata, or watercolor
(optional) plot options
colorlist : a list of colors to be used for the gradient. If not provided, the default value is the first two colors of the currently selected palette.
grid : truefalse; controls the display of a grid of so-called graticule lines: curves of constant latitude and curves of constant longitude. By default, grid is set to be false. If it is true, this command shows latitude and longitude curves both at intervals of 15 degrees.
markers : sets the proportion of the range of data falls in each color range. For more details, see the plot gradient color schemes help page.
projection : specifies the name of the supported map projection to use. The default projection is MillerCylindrical. See ListOfProjections for a complete list of supported map projections.
transformdata : option can be used to apply a function to the data before it is colored. For more details, see the plot gradient color schemes help page.
watercolor : color object, plot color, or a color string recognized by ColorTools; specifies the color of oceans and other bodies of water.
The ChoroplethMap command creates and displays a map plot for m, with countries colored according to the given set of data.
If TimeSeries data is provided through a DataSets[Builtin][Reference] object, then an animation is created, with each point in time corresponding to one frame.
Note: In this case, the procedure may take a long time to run. Creating an animation with the Globe projection is particularly slow, and is not advised.
Regions with the smallest data values are shaded with first color listed in colorlist, regions with the largest data values are shaded with the last color listed in colorlist, and the values in between transition through the other colors, in order, listed in colorlist.
Regions with no data, or with data which is undefined, are highlighted in a light shade of grey.
If a table is passed to ChoroplethMap, an index-entry pair corresponds to a country (the index) and its data (the entry).
If an Array or Matrix is passed, the first column should contain country names, and the second should contain the corresponding data. The rtable must have exactly two columns.
If a DataSeries or DataFrame is passed, it must have a single column. The row labels must be the country names and the column must hold the corresponding data.
If a DataSets[Builtin][Reference] object is passed, the element names should correspond to the country names, and the data contained in the reference should be the corresponding data.
m ≔ DataSets:-Builtin:-WorldMap⁡
m≔PLOT⁡...A map of the worldprojection: MillerCylindrical
Highlight Australia, Brazil, Canada, Denmark, and Egypt.
Canada, with the central data value, is colored red, since red is the color in the center of the colorlist.
Brazil and Denmark (including Greenland) are colored with intermediate colors, in accordance with their data values.
Display an animation of population over time.
The transformdata option is used to apply the natural logarithm to the data is colored, so that the impact of outliers with very large or very small populations on the coloring is reduced.
Note that it will take some time for data to be loaded.
countries ≔ DataSets:-Builtin:-Reference⁡Country:
pop ≔ countries..,Population:
Display the coastline length of various countries, using a different projection and a different transformation: many countries have coastline length 0, so taking the logarithm would yield minus infinity. Instead, we add 1 to each coastline length before taking the logarithm.
coastlines ≔ countries..,Coastline
coastlines≔Country (Name)CoastlineAfghanistan0Albania362.⁢kmAlgeria998.⁢km⋮⋮(182 more)
ISO 3166 Country Codes, International Organization for Standardization.
The DataSets[Builtin][WorldMap][ChoroplethMap] command was introduced in Maple 2017.
For more information on Maple 2017 changes, see Updates in Maple 2017.
Example: Visualizing Custom Data on a Choropleth Map
Download Help Document