Thematic Maps

What Is a Thematic Map?

Most published and online maps fall into four categories:

Although online maps often combine these categories in new and unexpected ways, published maps and atlases tend to respect them.

Thematic maps tend to be more highly stylized than other types of maps and frequently omit locational information such as place names, physical features, coordinate grids, and map scales. This is because rather than showing physical features on the ground, such as shorelines, roads, settlements, topography, and vegetation, a thematic map displays quantified facts (a "theme"), such as statistics for a region or sets of regions. Examples include the locations of traffic accidents in a city, or election results by state. Thematic maps have a wide vocabulary of cartographic symbols, such as point symbols, dot distributions, "quiver" vectors, isolines, colored zones, raised prisms, and continuous 3-D surfaces. Mapping Toolbox™ functions can generate most of these types of map symbology.

Choropleth Maps

The most familiar form of thematic map is probably the choropleth map (from the Greek choros, for place, and plethos, for magnitude). Often used to present data in newspapers, magazines, and reports, choropleth maps fill geographic zones (such as countries or states, but also matrices) with colors and/or patterns to represent nominal, ordinal, or cardinal data values. As there are usually more possible data values than unique symbols or colors capable of differentiating them, choropleth maps usually classify their data into value ranges.

Mapping Toolbox choropleth maps are constructed with patch objects . It assigns a color to each patch face to represent a specified variable, one value per patch. When the variable is scalar (as opposed to nominal) it generally represents a density (such as population per unit area), intensity (such as income per family), or incidence rate (such as fatalities per thousand persons). It can also convey extensive measurements or counts (such as electoral votes per state) if used carefully.

To make a choropleth map you need to input or compute a vector of values, one for each patch in a vector data set. Symbolizing such data values with the toolbox is straightforward. It involves assigning the data values to the CData property of a set of patches, and then setting up a colormap with an appropriate color scheme and range. Colormaps usually map N or fewer values (for N patches) to M colors. M can be any number between 2 and N, but typically ranges between 5 and 10.

In the following example, patches representing the 50 states of the U.S. (and the District of Columbia) are displayed and colored according to the surface areas calculated by the areaint function. An equal-area projection is appropriate for this and other choropleth maps. This is because data is often computed or normalized over the patches being displayed, and thus area distortion should be minimized, even at the expense of shape distortion.

  1. Import low-resolution U.S. state boundary polygons:

    states = shaperead('usastatelo', 'UseGeoCoords', true);

    This data set includes patch data for individual states, the United States, and its Great Lakes.

  2. Set up map axes with a projection suitable to display all 50 states with equal areas, a graticule, and grid labels:

    axesm('MapProjection', 'eqaconic', 'MapParallels', [],...
      'MapLatLimit', [15 75], 'MapLonLimit', [-175 -60],...
      'MLineLocation', 15, 'MLabelParallel', 'south',...
      'MeridianLabel', 'on', 'ParallelLabel', 'on',...
      'GLineStyle', '-', 'GColor' , 0.5*[1 1 1],...
      'Grid', 'on', 'Frame', 'on')

  3. Draw the polygon map in the state structure using face colors randomly selected by polcmap:

    faceColors = makesymbolspec('Polygon',...
        {'INDEX', [1 numel(states)], 'FaceColor', ...
        polcmap(numel(states))});
    geoshow(states, 'DisplayType', 'polygon', ...
    'SymbolSpec', faceColors)

  4. Choose an ellipsoid for computing spherical area:

    wgs84 = almanac('earth', 'geoid', 'kilometers', 'grs80');
  5. Add a 'SurfaceArea' field to the states geostruct, and assign surface areas in square kilometers for each U.S. state plus D.C. with a for loop:

    for k = 1:numel(states)
        states(k).SurfaceArea = sum(areaint(states(k).Lat, ...
        states(k).Lon, wgs84));
    end
    maxarea = max([states.SurfaceArea]);
  6. Redisplay the states based on the surface area. Use a monotonic colormap from red to yellow.

    surfaceColors = makesymbolspec('Polygon',...
        {'SurfaceArea', [0 maxarea], ...
        'FaceColor', autumn(numel(states))});
    geoshow(states, 'DisplayType', 'polygon', ...
    'SymbolSpec', surfaceColors)
    title('State Surface Area in Square Kilometers')

  7. Show a colorbar as a key to the symbology, in its default location. This legend relates patch color to area in square km:

    caxis([0 maxarea])
    colormap('autumn')
    colorbar

  8. The map is mostly red, as the above figure shows. Experiment with other colormaps. Some names of predefined colormaps are autumn, cool, copper, gray, pink, and jet.

    Note that while the color scale varies continuously, many states appear to be the same color. This is because of the skewed distribution of state areas. One way to differentiate the symbology is to clamp the lower end (because the smallest patches, such as District of Columbia and Rhode Island, are much smaller than average) and the upper end (because Alaska's area is so much larger than that of any other state).

  9. Change the colormap to one that has more hues and a smaller number of steps, and redraw the colorbar to display the new value range:

    minarea = 10000;
    surfaceColors = makesymbolspec('Polygon',...
        {'Default','FaceColor','red'}, ...
        {'SurfaceArea', [ minarea maxarea], 'FaceColor', cool(16)});
    geoshow(states,'DisplayType', 'polygon', ...
        'SymbolSpec', surfaceColors)
    
    caxis([minarea maxarea])
    colormap(cool(16))
    colorbar

Note how you can specify the size of a colormap with the colormap syntax used above. Be aware that, because you clamped the value range, the numeric limits of the colorbar overstate the minimum area and understate the maximum area. However, the map gives much more information overall because more states have distinct symbology, as the resulting map depicts.

Special Thematic Mapping Functions

In addition to choropleth maps, other Mapping Toolbox display and symbology functions include

Function

Used For

cometm

Traces (animates) vectors slowly from a comet head

comet3m

Traces (animates) vectors in 3-D slowly from a comet head

quiverm

Plots directed vectors in 2-D from specified latitudes and longitudes with lengths also specified as latitudes and longitudes

quiver3m

Plots directed vectors in 3-D from specified latitudes, longitudes, and altitudes with lengths also specified as latitudes and longitudes and altitudes

scatterm

Draws fixed or proportional symbol maps for each point in a vector with specified marker symbol. Similar maps can be generated using geoshow and mapshow using appropriate symbol specifications ("symbolspecs").

stem3m

Projects a 3-D stem plot map on the current map axes

The cometm and quiverm functions operate like their MATLAB® counterparts comet and quiver. The stem3m function allows you to display geographic bar graphs. Like the MATLAB scatter function, the scatterm function allows you to display a thematic map with proportionally sized symbols. The tissot function calculates and displays Tissot Indicatrices, which graphically portray the shape distortions of any map projection. For more information on these capabilities, consult the descriptions of these functions in the reference pages.

Stem Maps

Stem plots are 3-D geographic bar graphs portraying numeric attributes at point locations, usually on vector base maps. Below is an example of a stem plot over a map of the continental United States. The bars could represent anything from selected city populations to the number of units of a product purchased at each location:

Contour Maps

Contour and quiver plots can be useful in analyzing matrix data. In the following example, contour elevation lines have been drawn over a topographical map. The region displayed is the Gulf of Mexico, obtained from the topo matrix. Quiver plots have been added to visualize the gradient of the topographical matrix.

Here is the displayed map:

Scatter Maps

The scatterm function plots symbols at specified point locations, like the MATLAB scatter function. If the symbols are small and inconspicuous and do not vary in size, the result is a dot-distribution map. If the symbols vary in size and/or shape according to a vector of attribute values, the result is a proportional symbol map.

Below is an example of using scatterm to create a star chart of the northern sky. The stars are represented by filled circles whose size is proportional to visual magnitude. To execute the following commands, select them all by dragging over the list in the Help browser, then right-click and choose Evaluate Selection:

close all; clear all
load stars
% Set all visual magnitude zero values to eps
index = find(vmag <= 0);
vmag(index) = eps;
% View the sky orthographically
axesm('MapProjection','ortho','Origin',[90 0])
setm(gca,'FLatLimit',[90 0],'MapLatLimit',[90 0])
gridm on
setm(gca,'LabelFormat','compass','LabelRotation','on')
setm(gca,'MLabelParallel',0,'PLabelMeridian',0)
setm(gca,'MeridianLabel','on','ParallelLabel','on')
setm(gca,'GlineStyle','-')
% Make scatterplot of vmag data with blue filled circles
scatterm(lat, long, vmag, 'b', 'filled')

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS