next up previous
Next: plot3d Up: Differentiation of Real-Valued Functions Previous: Differentiation of Real-Valued Functions

contourplot

The command ``contourplot'' plots the level curves or contour curves of a function of two variables on a specified domain in the plane. The command has three required arguments or inputs: the function, the range for the first variable, and the range for the second variable. Here is an example of the contourplot command. It will plot the contours of the function $f(x,\,y)=x^{2} - y^{2}$ on the rectangle $[-2,2]\times[-2.2]$. We will use the symbolic expression for fdirectly in the contour plot command.

(Note that you can resize the plot window by grabbing a corner of the plot window with the mouse.)

    contourplot(f(x,y) ,x=-2..2,y=-2..2);
By default, Maple plots the contours for 8 different values of the functions. These values are evenly spaced between the maximum and minimum values of the function on the domain. The number of contours can be changed by using the ``contours = `` option. In order to plot these curves, Maple samples the values of the function on a grid consisting of 25 points in the x-direction and 25 point in the y-direction. The number of grid points can be changed by using the ``grid = `` option. Increasing the number of grid points will have the effect of smoothing the contour curves. (For more information click on contourplot.)

The following command demonstrates the use of these two options.

   contourplot(f(x,y),x=-2..2,y=-2..2,contours = 15,grid = [35,35]);
CAUTION: Increasing the number of contours or the number of grid points will increase the time that it takes to render the plot.

It is also possible to change the style of the axes and display the plot so that the distances on the axes are to scale with each other. Clicking on the displayed plot will cause Maple to display a plot toolbar at the top of the Maple window which contains these options.


next up previous
Next: plot3d Up: Differentiation of Real-Valued Functions Previous: Differentiation of Real-Valued Functions

2000-08-31