Plot3D[f,{x,xmin,xmax},{y,ymin,ymax}]
generates a three-dimensional plot of f as a function of x and y.
Plot3D[{f1,f2,…},{x,xmin,xmax},{y,ymin,ymax}]
plots several functions.
Plot3D[{…,w[fi],…},…]
plots fi with features defined by the symbolic wrapper w.
Plot3D[…,{x,y}∈reg]
takes variables {x,y} to be in the geometric region reg.
Plot3D
Plot3D[f,{x,xmin,xmax},{y,ymin,ymax}]
generates a three-dimensional plot of f as a function of x and y.
Plot3D[{f1,f2,…},{x,xmin,xmax},{y,ymin,ymax}]
plots several functions.
Plot3D[{…,w[fi],…},…]
plots fi with features defined by the symbolic wrapper w.
Plot3D[…,{x,y}∈reg]
takes variables {x,y} to be in the geometric region reg.
Details and Options
- Plot3D is also known as a surface plot or surface graph.
- Plot3D evaluates f at values of x and y in the domain being plotted over and connects the points {x,y,f[x,y]} to form a surface showing how f varies with x and y.
- It visualizes the surface
. - Gaps are left at any point where the fi evaluate to anything other than real numbers.
- Plot3D treats the variables x and y as local, effectively using Block.
- Plot3D has attribute HoldAll and evaluates f only after assigning specific numerical values to x and y.
- In some cases it may be more efficient to use Evaluate to evaluate f symbolically before specific numerical values are assigned to x and y.
- The following wrappers w can be used for fi:
-
Annotation[fi,label] provide an annotation for fi Button[fi,action] evaluate action when the curve for fi is clicked Callout[fi,label] label the function with a callout Callout[fi,label,pos] place the callout at relative position pos EventHandler[fi,events] define a general event handler for fi Hyperlink[fi,uri] make the function a hyperlink Labeled[fi,label] label the function Labeled[fi,label,pos] place the label at relative position pos Legended[fi,label] identify the function in a legend PopupWindow[fi,cont] attach a popup window to the function StatusArea[fi,label] display in the status area on mouseover Style[fi,styles] show the function using the specified styles Tooltip[fi,label] attach a tooltip to the function Tooltip[fi] use functions as tooltips - Wrappers w can be applied at multiple levels:
-
w[fi] wrap fi w[{f1,…}] wrap a collection of fi w1[w2[…]] use nested wrappers - Callout, Labeled and Placed can use the following positions pos:
-
Automatic automatically placed labels Above, Below, Before, After positions around the surface {x,y} near the surface at a position {x,y} {x,y,z} at the position {x,y,z} {s,Above},{s,Below},… relative position at position s around the surface {pos,epos} epos in label placed at relative position pos of the surface - Plot3D has the same options as Graphics3D, with the following additions and changes: [List of all options]
-
Axes True whether to draw axes BoundaryStyle Automatic how to draw boundary lines for surfaces BoxRatios {1,1,0.4} bounding 3D box ratios ClippingStyle Automatic how to draw clipped parts of surfaces ColorFunction Automatic how to determine the color of surfaces ColorFunctionScaling True whether to scale arguments to ColorFunction EvaluationMonitor None expression to evaluate at every function evaluation Exclusions Automatic x, y curves to exclude ExclusionsStyle None what to draw at excluded curves Filling None filling under each surface FillingStyle Opacity[0.5] style to use for filling LabelingSize Automatic maximum size of callouts and labels MaxRecursion Automatic the maximum number of recursive subdivisions allowed Mesh Automatic how many mesh lines in each direction to draw MeshFunctions {#1&,#2&} how to determine the placement of mesh lines MeshShading None how to shade regions between mesh lines MeshStyle Automatic the style for mesh lines Method Automatic the method to use for refining surfaces NormalsFunction Automatic how to determine effective surface normals PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLabels None labels to use for surfaces PlotLegends None legends for surfaces PlotPoints Automatic the initial number of sample points in each direction PlotRange {Full,Full,Automatic} the range of z or other values to include PlotStyle Automatic graphics directives for the style for each surface PlotTheme $PlotTheme overall theme for the plot RegionFunction (True&) how to determine whether a point should be included ScalingFunctions None how to scale individual coordinates TextureCoordinateFunction Automatic how to determine texture coordinates TextureCoordinateScaling True whether to scale arguments to TextureCoordinateFunction WorkingPrecision MachinePrecision the precision used in internal computations - PlotStyle->None draws no surface, so effectively does not eliminate hidden surfaces.
- Plot3D initially evaluates each function at a grid of equally spaced sample points specified by PlotPoints. Then it uses an adaptive algorithm to choose additional sample points, subdividing at most MaxRecursion times.
- You should realize that with the finite number of sample points used, it is possible for Plot3D to miss features in your functions. To check your results, you should try increasing the settings for PlotPoints and MaxRecursion.
- With the setting Mesh->All, Plot3D draws mesh lines to show all subdivisions it makes.
- The default setting MeshFunctions->{#1&,#2&} draws an x, y mesh on each surface.
- The arguments supplied to functions in MeshFunctions and RegionFunction are x, y, z. Functions in ColorFunction and TextureCoordinateFunction are by default supplied with scaled versions of these arguments.
- ColorFunction, MeshFunctions, RegionFunction, and TextureCoordinateFunction are all evaluated over each surface.
- With the default settings Exclusions->Automatic and ExclusionsStyle->None, Plot3D breaks surfaces at discontinuity curves it detects. Exclusions->None joins across discontinuities.
- Possible settings for ScalingFunctions include:
-
sz scale the z axis {sx,sy} scale x and y axes {sx,sy,sz} scale x, y and z axes - Each scaling function si is either a string "scale" or {g,g-1}, where g-1 is the inverse of g.
- Plot3D returns Graphics3D[GraphicsComplex[data]].
- Themes that affect 3D surfaces include:
-

"DarkMesh" dark mesh lines 
"GrayMesh" gray mesh lines 
"LightMesh" light mesh lines 
"ZMesh" vertically distributed mesh lines 
"ThickSurface" add thickness to surfaces 
"FilledSurface" add filling below surfaces -
AlignmentPoint Center the default point in the graphic to align with AspectRatio Automatic ratio of height to width Axes True whether to draw axes AxesEdge Automatic on which edges to put axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} graphics directives to specify the style for axes Background None background color for the plot BaselinePosition
List of all options