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[…,{x,y}∈reg]
takes variables {x,y} to be in the geometric region reg.
Details and Options
- Holes are left at any positions where the fi evaluate to None or 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.
- Plot3D has the same options as Graphics3D, with the following additions and changes:
-
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 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 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 - Interactive labeling can be specified for surfaces using Tooltip, StatusArea, or Annotation.
- Plot3D[Tooltip[{f1,f2,…}],…] specifies that the fi should be displayed as tooltip labels for the corresponding surfaces.
- Tooltip[f,label] specifies an explicit tooltip label for a surface.
- 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" vertical mesh lines 
"ThickSurface" add thickness to surfaces 
"FilledSurface" add filling below surfaces
Examples
open allclose allSee Also
ListPlot3D DiscretePlot3D ParametricPlot3D ContourPlot DensityPlot SliceContourPlot3D SliceDensityPlot3D Graphics3D ListSurfacePlot3D Plot Show
Tutorials
Related Guides
Related Links
Introduced in 1988
(1.0)
| Updated in 2017 (11.1)