Use contour plots to display the relationship between two independent variables and a dependent variable. The graph shows values of the Z variable for combinations of the X and Y variables. The X and Y values are displayed along the X and Y-axes, while contour lines and bands represent the Z value. The contour lines connect combinations of the X and Y variables that produce equal values of Z.
Contour plots are particularly helpful when you need to identify combinations of X and Y that produce beneficial or required values of Z. The contour lines and bands make it easy to find combinations that yield the values you need.
Use a contour plot to assess the following features of your dataset:
- Explore the relationship between three variables on a single chart.
- View combinations of X and Y that produce desirable outcome values.
Example Contour Plot
For example, a biologist studies the effect of stream depth and canopy cover on fish biomass.
A contour plot typically contains the following elements:
- X and Y-axes denoting values of two continuous independent variables.
- Colored bands representing ranges of the continuous dependent (Z) variable.
- Contour lines connecting points that have the same dependent value.
For the fish biomass data, the contour plot indicates that the highest biomass occurs near depths of 30 inches and in areas with a canopy cover of 25 percent. The lowest biomass values occur in shallower streams where canopy cover does not appear relevant.
Learn more about the X and Y Axis.
Interpreting Contour Plots and Finding Combinations that Produce Good Outcomes
Use a contour plot to explore the relationship between three variables. These plots display two independent variables (X, Y) and one dependent variable (Z). Contour plots help identify combinations that yield beneficial outcome values. Look for the following:
- Combinations of X and Y that produce minima or maxima.
- Ridges of high values and valleys of low values.
Contour plots are similar to topographical maps because they display three characteristics using a two-dimensional display. Similarly, tighter spaced lines indicate that the dependent (Z) variable changes more quickly in association with changes in the X and Y variables.
Use contour plots in conjunction with regression analysis to statistically test the relationships between variables. Another form of contour plots displays the fitted relationships between variables in regression models. For an example of this capability using binary logistic regression, read my post about Statistical Analysis of the Republican Establishment Split.