A Contour Plot is a two-dimensional graph of three measurement variables: two inputs (x1 and x2) and one response (y), where contour lines connect points on the x1 and x2 plane that have the same value for y. In other words, it is a graphical technique for representing a 3-dimensional surface by plotting constant z slices, called contours, on a 2-dimensional format. That is, given a value for z, lines are drawn for connecting the (x,y) coordinates where that z value occurs. It is used to answer the question: How does Z change as a function of X and Y?

The contour plot is an alternative to a 3-D surface plot.

Contour plot
This contour plot shows that the surface is symmetric and peaks in the center.

The contour plot is formed by:
Vertical axis: Independent variable 2
Horizontal axis: Independent variable 1
Lines: iso-response values


The independent variables are usually restricted to a regular grid. The actual techniques for determining the correct iso-response values are rather complex and are almost always computer generated.
An additional variable may be required to specify the Z values for drawing the iso-lines. Some software packages require explicit values. Other software packages will determine them automatically.

If the data (or function) do not form a regular grid, you typically need to perform a 2-D interpolation to form a regular grid.

References

Engineering Statistics Handbook. Contour Plot. https://www.itl.nist.gov/div898/handbook/eda/section3/contour.htm