plots - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Graphics : Packages : plots : plots/contourplot

This page is an exact match for your search term. Click here to search for all help pages containing the term, "contourplot"

plots

  

contourplot

  

2-D contour plotting

  

contourplot3d

  

3-D contour plotting

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

contourplot(expr1, x=a..b, y=c..d, opts)

contourplot(f, a..b, c..d, opts)

contourplot([exprf, exprg, exprh], s=a..b, t=c..d, opts)

contourplot([f, g, h], a..b, c..d, opts)

contourplot3d(expr1, x=a..b, y=c..d, opts)

contourplot3d(f, a..b, c..d, opts)

contourplot3d([exprf, exprg, exprh], s=a..b, t=c..d, opts)

contourplot3d([f, g, h],a..b, c..d, opts)

Parameters

f, g, h

-

function(s) to be plotted

expr1

-

expression in x and y

exprf, exprg, exprh

-

expressions in s and t

a, b

-

real constants

c, d

-

real constants, procedures or expressions in x

x, y, s, t

-

names

opts

-

(optional) plot options

Description

• 

Both contourplot and contourplot3d take the same arguments and generate a contour plot for a given expression or function. In other words, these commands both produce a set of level curves of the input function for a discrete set of values (i.e. levels) of the third coordinate. The differences are as follows: contourplot3d generates a 3-D view of the contours raised to their appropriate levels, whereas contourplot generates a flat 2-D contour. A 2-D contour can be displayed with a 3-D contour to create a drop-shadow view of the plot (see plottools[transform] for an example). Furthermore, contourplot3d is faster than contourplot. In the following sections and examples, all the features and functionalities apply to both contourplot and contourplot3d.

• 

The four different calling sequences to the contourplot function above all define a contour plot. The first two calling sequences describe contour plots in Cartesian coordinates while the second two describe contour parametric plots.

• 

In the first calling sequence, contourplot(expr1, x=a..b, y=c..d), the expression expr1 must be a Maple expression in the names x and y.  The range a..b must evaluate to real constants. The range c..d must either evaluate to real constants or be expressions in x. They specify the range over which expr1 will be plotted.

• 

In the second calling sequence, contourplot(f, a..b, c..d), f must be a Maple procedure or operator which takes two arguments. Operator notation must be used, that is, the procedure name is given without parameters specified, and the ranges must be given simply in the form a..b, rather than as an equation. The second range c..d can have arguments evaluating to real constants or procedures of one variable.

• 

A contour parametric plot can be defined by three expressions expr1, expr2, and expr3 in two variables.  In the third calling sequence, contourplot([expr1, expr2,expr3], s=a..b, t=c..d), expr1, expr2, and expr3 must be Maple expressions in the names s and t.

• 

Finally, in the fourth calling sequence, contourplot([f, g, h], a..b, c..d), f, g, and h must be Maple procedures or operators taking two arguments.  Here again, operator notation must be used.

• 

A contour plot can also be created from a list of data.  See plots[listcontplot] and plots[listcontplot3d] for details.

• 

Options opts are specified as equations of the form option = value.  For example, the option grid=m,n where m and n are positive integers specifies that the contourplot is to be constructed on an m by n grid at equally spaced points in the ranges a..b and c..d respectively. By default a 25 by 25 grid is used, thus 625 points are generated.  See plot/options and plot3d/option for more information.  The gridstyle option is not available for contourplot3d.

• 

There are eight contour levels by default. You can alter the number and the location of the contours used with the option contours = c where c is either an integer specifying the number of evenly spaced levels or a list of points representing the contour levels.

• 

The option filledregions = true can be used to obtain a filled contour plot. In this case you can also change the default coloring gradations via the coloring=a,b  option, where a, b are colors recognized by plot. See plot/color for information about specifying colors. When a filled contour plot is requested, contour levels provided as a list through the contours option are sorted, if they are not already in increasing or decreasing order.

• 

It is also possible to get a three dimensional version of contour plots via using the plot3d command with style = contour. See plot3d/option.

Examples

withplots:

using expressions as input

contourplotsinxy,x=3..3,y=3..3

contourplotsinxy,x=3..3,y=3..3,contours=3

contourplotsinxy,x=3..3,y=3..3,contours=12,14,12,34

contourplot5xx2+y2+1,x=3..3,y=3..3,filledregions=true,coloring=White,DarkViolet

using procedures as input

contourplotbinomial,0..5,0..5

various coordinate systems can be specified

contourplot1.3xsiny,x=1..2π,y=0..π,coords=spherical,grid=80,80

multiple contour plots can also be done

contourplotsinxy,x+2y,x=π..π,y=π..π

c1cosx2cos0.4y,sinx2sin0.4y,y

c1:=cosx2cos0.4y,sinx2sin0.4y,y

(1)

c2cosx+2cos0.4y,sinx+2sin0.4y,y

c2:=cosx+2cos0.4y,sinx+2sin0.4y,y

(2)

contourplotc1,c2,x=0..2π,y=0..10

and plots in polar coordinates, where the underlying coordinate system of the 3-D surface is cylindrical

contourplotr,t,r1rsintlnr,r=1..4,t=0..2π,coords=cylindrical,contours=20

The commands to create the plots from the Plotting Guide are

contourplot5xx2+y2+1,x=3..3,y=3..3,filledregions=true

contourplot3d5xx2+y2+1,x=3..3,y=3..3,filledregions=true

See Also

plot

plot/coords

plot/options

plot3d

plot3d/coords

plot3d/option

plots[listcontplot3d]

plots[listcontplot]

plottools[transform]

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam