DiscretePlot3D
✖
DiscretePlot3D
generates a plot of f when i runs from imin to imax and j runs from jmin to jmax.
uses successive i values i1, …, jm and j values j1, …, jn.
Details and Options




- DiscretePlot3D is typically used to visualize bivariate sequences.
- DiscretePlot3D plots the variable i along the
axis and j along the
axis.
- DiscretePlot3D uses the standard Wolfram Language iterator specification.
- DiscretePlot3D treats the variables i and j as local, effectively using Block.
- DiscretePlot3D has attribute HoldAll, and evaluates f only after assigning specific numerical values to i and j.
- In some cases, it may be more efficient to use Evaluate to evaluate f symbolically before specific numerical values are assigned to i and j.
- The precision used in evaluating f is the minimum precision used in the iterators.
- The form w[f] provides a wrapper w to be applied to the resulting graphics primitives.
- The following wrappers can be used:
-
Annotation[f,label] provide an annotation Button[f,action] define an action to execute when the element is clicked Callout[f,label] label the element with a callout Callout[f,label,pos] place the callout at relative position pos EventHandler[f,…] define a general event handler for the element Hyperlink[f,uri] make the element act as a hyperlink Labeled[f,label] make the data a hyperlink Labeled[f,label,pos] place the label at relative position pos Legended[f,label] identify the element in a legend PopupWindow[f,cont] attach a popup window to the element StatusArea[f,label] display in the status area when the element is moused over Style[f,opts] show the element using the specified styles Tooltip[f,label] attach an arbitrary tooltip to the element - Callout and Labeled can use the following positions pos:
-
Automatic automatically placed labels Above, Below, Before, After positions around the data x near the data at a position x {s,Above},{s,Below},… relative position at position s along the data {pos,epos} epos in label placed at relative position pos of the data - Labels that depend on {i,j} will be applied for each plot element, while labels that are independent of {i,j} will only occur once.
- DiscretePlot3D has the same options as Graphics3D, with the following additions and changes: [List of all options]
-
Axes True whether to draw axes 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 ExtentElementFunction Automatic how to generate raw graphics for extent fills ExtentMarkers None markers to use for extent boundaries ExtentSize Automatic width and depth to extend from plot point Filling Automatic filling under each surface FillingStyle Opacity[0.5] style to use for filling Joined False whether to join LabelingFunction Automatic how to label points LabelingSize Automatic maximum size of callouts and labels Method Automatic the methods to use PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLegends None legends for sequences PlotMarkers None markers to use for plot points PlotRange {Full,Full,Automatic} the range of 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 WorkingPrecision MachinePrecision the precision used in internal computations - The arguments supplied to ColorFunction are
,
,
.
- With the setting ExtentSize->{{sxl,sxr},{syl,syr}} a horizontal plane is drawn around each plot point extending sxl to the left and sxr to the right along the
axis and syl to the left and syr to the right along the
axis. With ExtentMarkers->{{mxl,mxr},{myl,myr}}, the markers mxl and mxr will be used as left and right markers along the
axis and myl and myr as left and right markers along the
axis.
- The arguments supplied to ExtentElementFunction are the element region {{xmin,xmax},{ymin,ymax},{zmin,zmax}} and the sample point {xi,yi,zi}.
- With the setting ExtentSize->None, xmin is equal to xmax and ymin is equal to ymax. With the setting Filling->None, zmin is equal to zmax.
- Possible settings for PlotMarkers include:
-
None omit markers when drawing surfaces "Point" use 2D points as markers "Sphere" use 3D spheres as markers {"Point",s},{"Sphere",s} specify the size s of the markers {spec1,spec2,…} use specification speci for expression expri - The marker size s can be a symbolic value such as Tiny, Small, Medium and Large or a scaled fraction of the width of the graphic.
- 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.
-
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 Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic Boxed True whether to draw the bounding box BoxRatios {1,1,0.4} bounding 3D box ratios BoxStyle {} style specifications for the box ClippingStyle Automatic how to draw clipped parts of surfaces ClipPlanes None clipping planes ClipPlanesStyle Automatic style specifications for clipping planes ColorFunction Automatic how to determine the color of surfaces ColorFunctionScaling True whether to scale arguments to ColorFunction ContentSelectable Automatic whether to allow contents to be selected ControllerLinking False when to link to external rotation controllers ControllerPath Automatic what external controllers to try to use Epilog {} 2D graphics primitives to be rendered after the main plot EvaluationMonitor None expression to evaluate at every function evaluation ExtentElementFunction Automatic how to generate raw graphics for extent fills ExtentMarkers None markers to use for extent boundaries ExtentSize Automatic width and depth to extend from plot point FaceGrids None grid lines to draw on the bounding box FaceGridsStyle {} style specifications for face grids Filling Automatic filling under each surface FillingStyle Opacity[0.5] style to use for filling FormatType TraditionalForm default format type for text ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels, etc. ImageSize Automatic absolute size at which to render the graphic Joined False whether to join LabelingFunction Automatic how to label points LabelingSize Automatic maximum size of callouts and labels LabelStyle {} style specifications for labels Lighting Automatic simulated light sources to use Method Automatic the methods to use PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLabel None a label for the plot PlotLegends None legends for sequences PlotMarkers None markers to use for plot points PlotRange {Full,Full,Automatic} the range of or other values to include
PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic final display region to be filled PlotStyle Automatic graphics directives for the style for each surface PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} 2D graphics primitives to be rendered before the main plot RegionFunction (True&) how to determine whether a point should be included RotationAction "Fit" how to render after interactive rotation ScalingFunctions None how to scale individual coordinates SphericalRegion Automatic whether to make the circumscribing sphere fit in the final display area Ticks Automatic specification for ticks TicksStyle {} style specification for ticks TouchscreenAutoZoom False whether to zoom to fullscreen when activated on a touchscreen ViewAngle Automatic angle of the field of view ViewCenter Automatic point to display at the center ViewMatrix Automatic explicit transformation matrix ViewPoint {1.3,-2.4,2.} viewing position ViewProjection Automatic projection method for rendering objects distant from the viewer ViewRange All range of viewing distances to include ViewVector Automatic position and direction of a simulated camera ViewVertical {0,0,1} direction to make vertical WorkingPrecision MachinePrecision the precision used in internal computations

List of all options




Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Scope (12)Survey of the scope of standard use cases
Data and Layouts (4)

https://wolfram.com/xid/0h2m7kl5fc-fu5ydu

Use wrappers on individual data, datasets, or collections of datasets:

https://wolfram.com/xid/0h2m7kl5fc-fv6xu4


https://wolfram.com/xid/0h2m7kl5fc-iazdoz

Override the default tooltips:

https://wolfram.com/xid/0h2m7kl5fc-dw7akx

Use PopupWindow to provide additional drilldown information:

https://wolfram.com/xid/0h2m7kl5fc-damue8

Button can be used to trigger any action:

https://wolfram.com/xid/0h2m7kl5fc-b8fpl2

Use ScalingFunctions to scale the axes:

https://wolfram.com/xid/0h2m7kl5fc-lcz5ah

Labeling and Legending (3)

https://wolfram.com/xid/0h2m7kl5fc-dd65go


https://wolfram.com/xid/0h2m7kl5fc-t4phh0

Specify label names with LabelingFunction:

https://wolfram.com/xid/0h2m7kl5fc-tv490m


https://wolfram.com/xid/0h2m7kl5fc-cfr8fl

Styling and Appearance (5)
Use ExtentSize to associate a region with a point:

https://wolfram.com/xid/0h2m7kl5fc-mjo7nq

Use an explicit list of styles for the plots:

https://wolfram.com/xid/0h2m7kl5fc-50o6wo

Use any gradient color schemes from ColorData:

https://wolfram.com/xid/0h2m7kl5fc-gp1e

Style can be used to override styles:

https://wolfram.com/xid/0h2m7kl5fc-o2q0l


https://wolfram.com/xid/0h2m7kl5fc-lx8b8

Show extent region boundaries:

https://wolfram.com/xid/0h2m7kl5fc-3ymwq


https://wolfram.com/xid/0h2m7kl5fc-3491qi

Use a theme with dark background in a high-contrast color scheme:

https://wolfram.com/xid/0h2m7kl5fc-z46qh4

Options (70)Common values & functionality for each option
ColorFunction (6)
Color the points by scaled ,
, or
value:

https://wolfram.com/xid/0h2m7kl5fc-x4atef

Color the surface by scaled ,
, or
value:

https://wolfram.com/xid/0h2m7kl5fc-4tbgtr

Color the regions by scaled ,
, or
value:

https://wolfram.com/xid/0h2m7kl5fc-wv5jc0


https://wolfram.com/xid/0h2m7kl5fc-b4pghp

ColorFunction has higher priority than PlotStyle:

https://wolfram.com/xid/0h2m7kl5fc-6nax88

Use black when two numbers are relatively prime:

https://wolfram.com/xid/0h2m7kl5fc-ugscb

ColorFunctionScaling (1)
EvaluationMonitor (1)
ExtentElementFunction (5)
Get a list of built-in settings for ExtentElementFunction:

https://wolfram.com/xid/0h2m7kl5fc-iuo5q3

For detailed settings, use Palettes ▶ Chart Element Schemes:

https://wolfram.com/xid/0h2m7kl5fc-enr6pq


https://wolfram.com/xid/0h2m7kl5fc-xnv5t

This ChartElementFunction is appropriate to show the global scale:

https://wolfram.com/xid/0h2m7kl5fc-cxoj1e

Write a custom ExtentElementFunction:

https://wolfram.com/xid/0h2m7kl5fc-chv27c

https://wolfram.com/xid/0h2m7kl5fc-hh96wb

A built-in element function may have options; use Palettes ▶ Chart Element Schemes to set them:

https://wolfram.com/xid/0h2m7kl5fc-fjaidg


https://wolfram.com/xid/0h2m7kl5fc-eqia3q

ExtentMarkers (4)

https://wolfram.com/xid/0h2m7kl5fc-2s1sh2

Use lines to show the extent edges:

https://wolfram.com/xid/0h2m7kl5fc-79tobh

Use varying sized tubes to show the extent edges:

https://wolfram.com/xid/0h2m7kl5fc-6t64gs

Place tubes along the front and left edges of the extent region:

https://wolfram.com/xid/0h2m7kl5fc-5mowwx

ExtentSize (6)

https://wolfram.com/xid/0h2m7kl5fc-60myuf

Draw full regions around the heights:

https://wolfram.com/xid/0h2m7kl5fc-spvk85


https://wolfram.com/xid/0h2m7kl5fc-feft18


https://wolfram.com/xid/0h2m7kl5fc-4mol01


https://wolfram.com/xid/0h2m7kl5fc-u2zlbf

Use sizes relative to the distance between points:

https://wolfram.com/xid/0h2m7kl5fc-kaihqz


https://wolfram.com/xid/0h2m7kl5fc-cbr560

Use equally sized regions that do not overlap:

https://wolfram.com/xid/0h2m7kl5fc-j339pu


https://wolfram.com/xid/0h2m7kl5fc-9ku5ev

Control the placement of the region around the points:

https://wolfram.com/xid/0h2m7kl5fc-7s6y29

Filling (3)
DiscretePlot3D fills to :

https://wolfram.com/xid/0h2m7kl5fc-l7vxrm


https://wolfram.com/xid/0h2m7kl5fc-d56vyr


https://wolfram.com/xid/0h2m7kl5fc-ly345

FillingStyle (3)
Fill to the bottom with a variety of styles:

https://wolfram.com/xid/0h2m7kl5fc-nuohm0


https://wolfram.com/xid/0h2m7kl5fc-gp4nqz

Use different colors above and below the filling level:

https://wolfram.com/xid/0h2m7kl5fc-i937ir

Only fill below the filling level:

https://wolfram.com/xid/0h2m7kl5fc-ejttwu

Joined (2)
LabelingFunction (4)
Put the labels above the points:

https://wolfram.com/xid/0h2m7kl5fc-k2w4me


https://wolfram.com/xid/0h2m7kl5fc-3eegn8

Use callouts to label the points:

https://wolfram.com/xid/0h2m7kl5fc-z650tp

Label the points with their values:

https://wolfram.com/xid/0h2m7kl5fc-gchuny

Label the points with their indices:

https://wolfram.com/xid/0h2m7kl5fc-ufafwq

LabelingSize (1)
PlotLegends (6)

https://wolfram.com/xid/0h2m7kl5fc-p8praw

Specify a list of labels for legends:

https://wolfram.com/xid/0h2m7kl5fc-j79o51


https://wolfram.com/xid/0h2m7kl5fc-3h7b6j

PlotLegends automatically picks up PlotStyle values:

https://wolfram.com/xid/0h2m7kl5fc-g06lg5

Use Placed to control legend placement:

https://wolfram.com/xid/0h2m7kl5fc-74cods

Use SwatchLegend to change legend appearance:

https://wolfram.com/xid/0h2m7kl5fc-rgjhl7

PlotMarkers (4)
Change the size of the default plot markers:

https://wolfram.com/xid/0h2m7kl5fc-k10ac4

Markers are not usually shown when surfaces are used:

https://wolfram.com/xid/0h2m7kl5fc-ig7922


https://wolfram.com/xid/0h2m7kl5fc-yk1etq


https://wolfram.com/xid/0h2m7kl5fc-6ox5xi


https://wolfram.com/xid/0h2m7kl5fc-qijx0c

PlotStyle (7)
Use different style directives:

https://wolfram.com/xid/0h2m7kl5fc-zvlxc

By default, different styles are chosen for multiple functions:

https://wolfram.com/xid/0h2m7kl5fc-drfjib

Explicitly specify the style for different functions:

https://wolfram.com/xid/0h2m7kl5fc-eqf

PlotStyle applies to points, lines, and surfaces:

https://wolfram.com/xid/0h2m7kl5fc-1faeoe


https://wolfram.com/xid/0h2m7kl5fc-5xalmd

PlotStyle can be combined with ColorFunction:

https://wolfram.com/xid/0h2m7kl5fc-rjb3ix

PlotStyle can be combined with FillingStyle:

https://wolfram.com/xid/0h2m7kl5fc-o1bmr5

FillingStyle by default uses the same style as PlotStyle with transparency:

https://wolfram.com/xid/0h2m7kl5fc-0b39nk

PlotTheme (4)
Use a theme with simple ticks and grid lines:

https://wolfram.com/xid/0h2m7kl5fc-twolx7


https://wolfram.com/xid/0h2m7kl5fc-xljar3

Use a theme with dark background in a high-contrast color scheme:

https://wolfram.com/xid/0h2m7kl5fc-h9ulha


https://wolfram.com/xid/0h2m7kl5fc-c50ybk

RegionFunction (4)

https://wolfram.com/xid/0h2m7kl5fc-pmxh63

Extended regions are treated as the underlying point without additional clipping:

https://wolfram.com/xid/0h2m7kl5fc-yh6dth

Regions can have several unconnected components:

https://wolfram.com/xid/0h2m7kl5fc-0hooke

Define regions using logical combinations of constraints:

https://wolfram.com/xid/0h2m7kl5fc-6gy0bf

ScalingFunctions (9)
By default, plots have linear scales in each direction:

https://wolfram.com/xid/0h2m7kl5fc-s1th8c

Use a log scale in the direction:

https://wolfram.com/xid/0h2m7kl5fc-yuq0eb

Use a linear scale in the direction that shows smaller numbers at the front:

https://wolfram.com/xid/0h2m7kl5fc-8ukzpu

Use a reciprocal scale in the direction:

https://wolfram.com/xid/0h2m7kl5fc-3hsf4h

Use different scales in the and
directions:

https://wolfram.com/xid/0h2m7kl5fc-yd8nx

Reverse the axis without changing the
axis:

https://wolfram.com/xid/0h2m7kl5fc-65sdmt

Use a scale defined by a function and its inverse:

https://wolfram.com/xid/0h2m7kl5fc-nkbfi6

Positions in Ticks and FaceGrids are automatically scaled:

https://wolfram.com/xid/0h2m7kl5fc-pf7tjx

PlotRange is automatically scaled:

https://wolfram.com/xid/0h2m7kl5fc-471ypb

Applications (2)Sample problems that can be solved with this function
Visualize properties of discrete distributions, such as probability density function:

https://wolfram.com/xid/0h2m7kl5fc-s5cavh

Cumulative distribution function:

https://wolfram.com/xid/0h2m7kl5fc-g8ipdu


https://wolfram.com/xid/0h2m7kl5fc-oe85dn

Approximate the volume under a surface using Riemann sums:

https://wolfram.com/xid/0h2m7kl5fc-rs27za


https://wolfram.com/xid/0h2m7kl5fc-0b44et


https://wolfram.com/xid/0h2m7kl5fc-dwdlky

Properties & Relations (4)Properties of the function, and connections to other functions
Plot3D generates continuous surfaces:

https://wolfram.com/xid/0h2m7kl5fc-nhtb7l

Use ListPointPlot3D to plot lists of values:

https://wolfram.com/xid/0h2m7kl5fc-bktwii

Use BarChart3D to show bars for lists of values:

https://wolfram.com/xid/0h2m7kl5fc-h6yve0

Use DiscretePlot to plot functions of single discrete variables:

https://wolfram.com/xid/0h2m7kl5fc-ex5xhu

Wolfram Research (2010), DiscretePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscretePlot3D.html (updated 2019).
Text
Wolfram Research (2010), DiscretePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscretePlot3D.html (updated 2019).
Wolfram Research (2010), DiscretePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/DiscretePlot3D.html (updated 2019).
CMS
Wolfram Language. 2010. "DiscretePlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/DiscretePlot3D.html.
Wolfram Language. 2010. "DiscretePlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2019. https://reference.wolfram.com/language/ref/DiscretePlot3D.html.
APA
Wolfram Language. (2010). DiscretePlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiscretePlot3D.html
Wolfram Language. (2010). DiscretePlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiscretePlot3D.html
BibTeX
@misc{reference.wolfram_2025_discreteplot3d, author="Wolfram Research", title="{DiscretePlot3D}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/DiscretePlot3D.html}", note=[Accessed: 09-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_discreteplot3d, organization={Wolfram Research}, title={DiscretePlot3D}, year={2019}, url={https://reference.wolfram.com/language/ref/DiscretePlot3D.html}, note=[Accessed: 09-July-2025
]}