How to make a contour plot
- Copy the three numeric columns X, Y and Z together with the header (one row = one measurement point).
- Choose the X-axis, Y-axis and Z (contour value) columns.
- Press Draw and use the color bands, contour lines and color bar to find the high and low regions.
Worked example with sample data
The sample data are 60 yield measurements taken while varying temperature (150-200°C) and pressure (1-5 bar).
Brighter (yellow) areas have higher yield. The center (around 170-180°C and 3 bar) is brightest and it darkens toward the edges, so the interpretation reports values that are higher toward the center. Yield ranges from 73.95% to 92.54%.
Where contour lines are dense near the edges, a small change in conditions drops yield sharply; in the broad central area yield stays stable even if conditions drift a little. It is safer to set operating conditions inside this broad flat area rather than exactly at the peak.
Contours near the sparse edges are interpolated, so confirm those conditions with extra measurements before using them.
What is a contour plot?
A contour plot shows the value (Z) at each position (X, Y) of a plane with lines joining equal values (contours) and colors. Like the contour lines on a map it reveals peaks (high values) and valleys (low values) at a glance, which makes it popular for studying how two process conditions affect a result.
How it is calculated
The points are joined by a Delaunay triangulation, and values inside each triangle are linearly interpolated from its three corners (the same method as matplotlib tricontourf). Contour levels split the Z range into about 14 tidy steps, colored with the viridis colormap.
The area outside the points (outside their convex hull) is not filled.
How to read a contour plot
- Bright (yellow) areas have high Z and dark (purple) areas low Z. The closer the contour lines, the faster the value changes.
- The automatic interpretation looks at how Z relates to the distance from the data center (R² of 0.3 or more) and reports whether the center or the edges are higher.
- Contours where points are sparse are interpolated and may differ from reality - measure that area more if needed.
Frequently asked questions
Does my data need to be on a grid?
No. Scattered points are fine. Each row needs X, Y and Z values; rows with any blank are skipped.
How many points do I need?
The plot works from 3 points, but 20 or more are recommended to see the shape.
What appears when I hover?
The magnet cursor snaps to the nearest actual point and shows its X, Y and Z values.