2D Plots

Here is a short example of producing 2D plots; that is, plots of surfaces z(x,y). It graphs the same function

z = sin xy

in a surface plot form and in a contour plot form. Furthermore, it shows you how to write a graph out to an image file in PNG (Portable Network Graphics) format. It also throws in an averaging over one of the dimensions (y) and a plot of the average.

The graphs produced are:


Taner Edis
Home
Last modified: April 17, 2007