Chapter 8. The Third Dimension

This chapter contains the following recipes:

  • Making a surface plot
  • Using coordinate mappings
  • Coloring the surface
  • Making a contour plot
  • Making a vector plot
  • Making an image plot or heat map
  • Combining contours and images
  • Combining surfaces with images
  • Plotting a path in 3D
  • Drawing parametric surfaces


Every graph we have seen so far in this book has been a plot of one quantity versus another quantity, or in the case of parametric plots, two coordinates that depend on a single third parameter. These are called two dimensional (2D) plots. In this chapter, we break into the third dimension. The graphs here are visualizations of quantities that depend on two variables; they are expressed as surfaces, contours, fields ...

Get gnuplot Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.