2D Functions
Function Plot
Parametric Plot
Multiple Parametric Plot
Filled Plot
Multiple Filled Plot
Logarithmic Plot


2D Data Plots
Data Plot
Data Error Plot
Data Logarithmic Plot
Data Labeled Plot


Contour & Density Plots
Contour Plot
Density Plot
Level Curves


3D Functions
3D Function Plot
3D Parametric Plot
3D Multiple Parametric Plot
3D Vector Field
3D Gradient Field
Shadow 3D Function

3D Data Plots
Contour 3D Data Plot
Density 3D Data Plot


Special Plots
Vector Field
Bar Charts
Pie Chart
Zonotope Show


Links
About This Site
Citation & Credits
Sci.Vis. Tutorials
webComputing


Contour Plot

A contour plot gives you essentially a “topographic map” of a function. The contours join points on the surface that have the same height. The default is to have contours corresponding to a sequence of equally spaced z values. By default contour plots are shaded, in such a way that regions with higher z values are lighter.

Enter a function z = f(x, y) :  " >   

Plot the function for :   " >  < = x < =  " >    " >  < = y < =  " >



<%Mathlet MSPBlock[{$$func, $$xBeg, $$xEnd, $$yBeg, $$yEnd, $$shading, $$plotPoints, $$contours, $$contLines, $$shColor, $$frame, $$plotLabel, $$fr1, $$fr2, $$fr3, $$fr4, $$rotateLabel, $$aspectRatio, $$rColor, $$gColor, $$bColor, $$rColorBackg, $$gColorBackg, $$bColorBackg, $$imageSize, $$xRangeBeg,$$xRangeEnd,$$yRangeBeg,$$yRangeEnd, $$zRangeBeg, $$zRangeEnd }, result = ContourPlot[$$func, {x, $$xBeg, $$xEnd}, {y, $$yBeg, $$yEnd}, AspectRatio->If[$$aspectRatioFlag === "Specified", $$aspectRatio, MSPToExpression[$$aspectRatioFlag]], ContourShading->$$shading, PlotPoints ->$$plotPoints, Contours->$$contours, ContourLines ->$$contLines, ColorFunction->$$shColor, PlotRange->{If[$$xPlotRange === "Specified",{$$xRangeBeg,$$xRangeEnd}, MSPToExpression[$$xPlotRange]], If[$$yPlotRange === "Specified",{$$yRangeBeg,$$yRangeEnd}, MSPToExpression[$$yPlotRange]], If[$$zPlotRange ==="Specified", {$$zRangeBeg,$$zRangeEnd}, MSPToExpression[$$zPlotRange]]}, Frame->$$frame, FrameLabel-> {If[$$fr1 === Null, "", ToString[HoldForm[$$fr1]]], If[$$fr2 === Null, "", ToString[HoldForm[$$fr2]]], If[$$fr3 === Null, "", ToString[HoldForm[$$fr3]]], If[$$fr4 === Null, "", ToString[HoldForm[$$fr4]]]}, PlotLabel->If[$$plotLabel === Null, "", ToString[HoldForm[$$plotLabel]]], RotateLabel->$$rotateLabel, DefaultColor->If[{$$rColor,$$gColor,$$bColor} =!= {"","",""}, RGBColor[$$rColor,$$gColor,$$bColor], Automatic], Background-> If[{$$rColorBackg,$$gColorBackg,$$bColorBackg} =!= {"","",""}, RGBColor[$$rColorBackg,$$gColorBackg,$$bColorBackg], Automatic], ImageSize-> If[NumberQ[$$imageSize],$$imageSize, Automatic] ]; If[Head[result] === ContourGraphics, MSPShow[result]] ] %>

Save as : 

With file name :   " >

<%Mathlet MSPBlock[{$$fname, $$submitButton1}, c = If[$$fname === Null, "", ToString[$$fname]]; ftype = Switch[$$opt, "jpg", "JPEG", "tif", "TIFF", "eps", "EPSTIFF", "xbm", "XBitmap", "mps", "MPS", _ , $$opt]; If[Head[result] === ContourGraphics, MSPReturn[DisplayString[result, ftype], "image/"<>ftype , c<>"."<>$$opt] ] ] %>

ContourPlot Options

Contour shading :  <%Mathlet MSPSetDefault[$$shading, "True"] %> > True   > False

Shading in :  <%Mathlet MSPSetDefault[$$shColor, "Automatic"] %> > Gray scale   > Color scale

Contour Lines :  <%Mathlet MSPSetDefault[$$contLines, "True"] %> > True   > False

Number of plot points :  " >    Number of contours :  " >

If you do not evaluate your function on a fine enough grid, there may be inaccuracies in your contour plot. A rapidly varying function gives a regular pattern of contours, but a function that is almost flat can give irregular contours. You can typically overcome such problems by increasing the value of Plot points.

General options

Plot range : (All - all points are included, Automatic - outlying points are dropped)

X :  <%Mathlet MSPSetDefault[$$xPlotRange, "Automatic"] %> > Automatic   > All   > Specified   " >  < = x < =  " >

Y :  <%Mathlet MSPSetDefault[$$yPlotRange, "Automatic"] %> > Automatic   > All   > Specified   " >  < = y < =  " >

Z :  <%Mathlet MSPSetDefault[$$zPlotRange, "Automatic"] %> > Automatic   > All   > Specified   " >  < = z < =  " >

<%Mathlet MSPSetDefault[$$frame, "True"] ;%> Frame :  > True   > False

Frame labels :

Frame label down :   " >   Frame label left :   " >

Frame label up :   " >   Frame label right :   " >  

<%Mathlet MSPSetDefault[$$rotateLabel, "True"] %> Rotate labels :  > True   > False   (whether to allow text in frame labels to be vertically positioned)

Plot label :   " >

<%Mathlet MSPSetDefault[$$aspectRatioFlag, "Automatic"] %> Aspect ratio :   > Default   > Automatic   > Specified:   " >
Setting the AspectRatio option changes the whole shape of your plot. AspectRatio gives the ratio of height to width.
Its default value is the inverse of the Golden Ratio - supposedly the most pleasing shape for a rectangle.
Automatic determines the shape of the display area from the original coordinate system.


Frame color (RGB color) :  red part :  " >   green part :  " >   blue part :  " >
The values of the color parts must be between 0 and 1.

Background (RGB color) :  red part :  " >   green part :  " >   blue part :  " >

Image size :   ">   specifies that the image should have a width of x printer's points

  
© 2004 webComputing,   Scientific Visualization