|
GEOG 414/514:
Advanced Geographic Data Analysis Multivariate descriptive displays or plots are designed to reveal the relationship among several variables simultaneously.. As was the case when examining relationships among pairs of variables, there are several basic characteristics of the relationship among sets of variables that are of interest. These include:
1. Enhanced 2-D Scatter plots The scatter diagram or scatter plot is the workhorse bivariate plot, and can be enhanced to illustrate relationships among three (or four) variables.
A basic “color plot” displays the values of three variables at a time using colored symbols, where the value of one variable determines the relative position of the symbol along the X-axis and the value of a second variable determines the relative position of the symbol along the Y-axis, and the value of the third variable is used to determine the color of the symbol. The Specmap data set illustrated the variations over time of oxygen-isotope data (that records global ice volume) which should theoretically depend on insolation. However, a simple plot of Insolation and O18 (and correlation) suggests otherwise: attach(specmap)
The correlation coefficient, r,
is also rather low.
cor(O18, Insol) [1] -0.2415094 Plotting O18 as a function of Age, and color coding the symbols by Insol levels, reveals the nature of the control of ice volume by insolation:
Now it’s possible to see that warm (and warming) intervals (points near the top of the plot) tend to have high (orange) solar radiation values, while cooling and cold intervals follow periods of declining solar radiation (blue) Information from four variables at a time can also be displayed. In this example for the Summit Cr. data, the plotting character is determined by Reach and its color by HU. Although these are factors, numerical variables could also be plotted. attach(sumcr)
The bubble plot displays the
values of three variables at a time using graduated symbols (usually
circles), where the value of one variable determines the relative position of
the symbol along the X-axis and the value of a second variable determines the
relative position of the symbol along the Y-axis, and the value of the third
variable is used to determine the size of the symbol. Here’s a simple map of the elevations of the attach(orstationc)
2.
3-D Scatter plots 3-D scatter plots (as distinct from scatter plot matrices involving three variables), illustrate the relationship among three variables by plotting them in a three-dimensional "workbox". There are a number of basic enhancements of the basic 3-D scatter plot, such as the addition of drop lines, lines connecting points, symbol modification and so on.
Displays the values of three variables at a time by plotting them in a 3-D workbox, where the value of one variable determines the relative position of the symbol along the X-axis and the value of a second variable determines the relative position of the symbol along the Y-axis, and the value of the third variable is used to determine the relative position along the Z-axis. This plot makes use of the lattice package. library(lattice)
Notice that you can still see the outline of the state, because elevation is a fairly well behaved variable.
The scatterplot3d package (by Ligges and Mächler) provides a way of constructing a 3-point cloud display with some nice embellishments. The first part of the code, like in making maps, does some setup like determining the number of colors to plot and getting their definitions. The second block produces the plot library(scatterplot3d) # get colors for
labeling the points # scatter plot
The “z-variable,” in this case, annual precipitation, is plotted as a dot, and for interpretability a drop line is plotted below the dot. This simple addition facilitates finding the location of each point (where it hits the x-y, or latitude-longitude plane), as well as the value of annual precipitation. Maps can be added to the 3-D scatter plot to improve interpretability: library(scatterplot3d)
The rgl package (by D. Alder) can be used to
plot points (and surfaces and lines) in a 3-D space. The main feature
that distinguishes this approach is the ability to rotate the cloud of points
"on the fly." Here’s what
the code looks like, and when the image appears, it can be rotated and spun
by dragging the mouse within the window.
Holding down the left button while dragging rotates the balls, while
holding down the right changes the perspective. library(rgl)
Here’s a second example, for a gridded data set of library(rgl)
Plot the SPECMAP data: attach(specmap)
3. Contour, levels, and surface
plots Contour plots are the multivariate plot type that is likely the most familiar to geographers. In R, there are two kinds of contour plots, "2-D contour plots" in which contours are drawn on a standard set of scatter diagram axes, and levels plots that illustrate similar information by coloring or shading a grid of points on the 2-D space, and contouring is achieved visually. All contour plots are constructed by selecting three variables. There are additional ways of creating contour plots which will be discussed later.
The following script creates a contour plot for annual precipitation data
at library(akima)
|