ListLinePlot3D

ListLinePlot3D[{{x1,y1,z1},{x2,y2,z2},,{xn,yn,zn}}]

plots a curve through the 3D points {xi,yi,zi}.

ListLinePlot3D[{{z11,z12,,z1n},,{zm1,zm2,,zmn}}]

plots each row {zi1,zi2,,zin} as a curve in the direction, with successive curves stacked in the direction.

ListLinePlot3D[{data1,data2,}]

plots curves through multiple sets of {x,y,z} points.

Details and Options

  • ListLinePlot3D is also known as 3D line graph, or 3D area graph when the area under the curve is filled. When showing each row of the data as a separate curve, ListLinePlot3D is also known as a ridgeline plot.
  • ListLinePlot3D allows you to draw curves in 3D through a given set of points.
  • Data values xi, yi and zi can be given in the following forms:
  • xia real-valued number
    Quantity[xi,unit]a quantity with a unit
    Around[xi,ei]value xi with uncertainty ei
    Interval[{xmin,xmax}]values between xmin and xmax
  • Values xi, yi and zi that are not of the preceding form are taken to be missing and are not shown.
  • The datai have the following forms and interpretations:
  • <|"k1"{x1,y1,z1},"k2"{x2,y2,z2},|>values {{x1,y1,z1},{x2,y2,z2},}
    {{x1,y1,z1}"lbl1",{x2,y2,z2}"lbl2",}, data{"lbl1","lbl2",}values {{x1,y1,z1},{x2,y2,z2},} with labels {lbl1,lbl2,}
    SparseArrayvalues as a normal array
    QuantityArraymagnitudes
    WeightedDataunweighted values
  • The following wrappers w can be used for the datai:
  • Annotation[datai,label]provide an annotation for the data
    Button[datai,action]define an action to execute when the data is clicked
    Callout[datai,label]label the data with a callout
    Callout[datai,label,pos]place the callout at relative position pos
    EventHandler[datai,]define a general event handler for the data
    Hyperlink[datai,uri]make the data a hyperlink
    Labeled[datai,label]label the data
    Labeled[datai,label,pos]place the label at relative position pos
    Legended[datai,label]identify the data in a legend
    PopupWindow[datai,cont]attach a popup window to the data
    StatusArea[datai,label]display in the status area on mouseover
    Style[datai,styles]show the data using the specified styles
    Tooltip[datai,label]attach a tooltip to the data
    Tooltip[datai]use data values as tooltips
  • Wrappers w can be applied at multiple levels:
  • {{,w[zi,j],}}wrap the value zi,j in array data
    {,w[{xi,yi,zi}],}wrap the point {xi,yi,zi}
    w[datai]wrap the data
    w[{data1,}]wrap a collection of datai
    w1[w2[]]use nested wrappers
  • ListLinePlot3D takes the same options as Graphics3D with the following additions and changes:
  • Axes Truewhether to draw axes
    BoxRatios {1,1,0.4}bounding 3D box ratios
    ColorFunction Automatichow to determine the color of points
    ColorFunctionScaling Truewhether to scale arguments to ColorFunction
    DataRange Automaticthe range of x and y values to assume for data
    Filling Nonehow to fill in stems for each point
    FillingStyle Automaticstyle to use for filling
    IntervalMarkers Automatichow to render uncertainty
    IntervalMarkersStyle Automaticstyle for uncertainty elements
    Joined Truewhether to join the points
    LabelingFunctionAutomatichow to label points
    LabelingSizeAutomaticsize to use for callout and label
    MeshNonehow many mesh points to draw on each line
    MeshFunctions{#1&}how to determine the placement of mesh points
    MeshShadingNonehow to shade regions between mesh points
    MeshStyleAutomaticthe style for mesh points
    PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
    PlotLabelsNonelabels to use for curves
    PlotLegends Nonelegends for points
    PlotMarkers Nonemarkers to use for points
    PlotRange {Full,Full,Automatic}the range of z or other values to include
    PlotRangePaddingAutomatichow much to pad the range of values
    PlotStyle Automaticstyles of points
    PlotTheme $PlotThemeoverall theme for the plot
    RegionFunction(True&)how to determine whether a point should be included
    RegionBoundaryStyle TemplateBox[{Automatic, paclet:ref/Automatic}, RefLink, BaseStyle -> {3ColumnTableMod}]style to use for a region
    ScalingFunctions Nonehow to scale individual coordinates
  • ListLinePlot3D[{{z11,z12,},}] by default takes the x and y coordinate values for each data point to be successive integers starting at 1.
  • The setting DataRange->{{xmin,xmax},{ymin,ymax}} specifies other ranges of coordinate values to use.
  • With the default setting DataRange->Automatic, ListLinePlot3D[{{z11,z12,z13},,{zn1,zn2,zn3}}] will assume that the data being given is {{x1,y1,z1},}, rather than an ×3 array of heights.
  • ListLinePlot3D[data,DataRange->All] always takes data to represent an array of heights.
  • Possible settings for PlotMarkers include:
  • Noneomit 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 IntervalMarkers include:
  • "Bars"draw bars to represent errors
    "Tubes"draw tubes to represent errors
  • Possible settings for ScalingFunctions include:
  • szscale 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.
  • The arguments supplied to functions in MeshFunctions and RegionFunction are , and . Functions in ColorFunction are by default supplied with scaled versions of these arguments.

Examples

open allclose all

Basic Examples  (5)

Plot a path through a set of points:

Fill the area under the curve:

Plot multiple filled paths at successive locations along the axis:

Plot multiple filled paths at successive locations along the axis:

Plot multiple curves through space:

Scope  (35)

General Data  (7)

For regular data consisting of values, the and data ranges are taken to be integer values:

Provide explicit and data ranges by using DataRange:

For irregular data consisting of triples, the and data ranges are inferred from the data:

Plot multiple sets of irregular data:

Areas around where the data is nonreal are excluded:

PlotRange is selected automatically:

Use PlotRange to focus in on areas of interest:

Use RegionFunction to restrict lines to a region given by inequalities:

Special Data  (6)

Use Quantity to include units with the data:

Plot data in a QuantityArray:

Specify the units used with TargetUnits:

Plot data with uncertainty:

Plot data from time series with automatic date ticks:

Specify strings to use as labels:

Plot data in a SparseArray:

Data Wrappers  (6)

Use a wrapper to style a specific curve:

Apply a style to all the curves:

Use the value of each point as a tooltip:

Use a specific label for all the points:

Label points with automatically positioned text:

Use PopupWindow to provide additional drilldown information:

Button can be used to trigger any action:

Labeling and Legending  (6)

Label points with automatically positioned text:

Specify that labels should be above or below the curve:

Specify label names with LabelingFunction:

Include legends for each point collection:

Specify the maximum size of labels:

Use the full label:

For dense sets of points, some labels may be turned into tooltips by default:

Presentation  (10)

Provide an explicit PlotStyle for the lines:

Provide separate styles for different sets:

Add labels:

Color lines by height:

Provide an interactive Tooltip for the whole plot:

Fill below the points:

Use a theme with simple ticks in a bright color scheme:

Use a highly styled theme:

Use a logarithmic scale on the axis:

Specify scaling functions for each axis:

Options  (68)

Axes  (3)

By default, axes are drawn:

Use AxesFalse to turn off axes:

Turn each axis on individually:

AxesLabel  (4)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes labels:

Use units as labels:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

BoxRatios  (2)

Automatic uses the natural scale from PlotRange:

Use BoxRatios to emphasize some particular feature, in this case, a saddle surface:

ColorFunction  (7)

Use a named gradient from ColorData to color curves by their height:

Color curves by scaled values:

Color curves by scaled values:

Color curves by scaled values:

Colors from ColorFunction are used with the filled regions as well as the curve:

Colors from ColorFunction have higher priority than from PlotStyle:

Colors from ColorFunction combine with non-color styles from PlotStyle:

ColorFunctionScaling  (2)

Use unscaled coordinates:

Unscaled coordinates are dependent on DataRange:

DataRange  (4)

Arrays of height values are displayed against the number of elements in each direction:

Rescale to the sampling space:

Triples are interpreted as , , coordinates:

Force interpretation as arrays of height values:

The dataset is normally interpreted as a list of , , triples:

Filling  (3)

Fill to the bottom, using "stems":

Filling occurs along the region cut by the RegionFunction:

Fill surface 1 to the bottom with blue and surface 2 to the top with red:

FillingStyle  (2)

Fill to the bottom with a variety of styles:

Fill to the plane from above only:

ImageSize  (7)

Use named sizes such as Tiny, Small, Medium and Large:

Specify the width of the plot:

Specify the height of the plot:

Allow the width and height to be up to a certain size:

Specify the width and height for a graphic, padding with space if necessary:

Use maximum sizes for the width and height:

Use ImageSizeFull to fill the available space in an object:

Specify the image size as a fraction of the available space:

IntervalMarkers  (2)

Interval markers are bars by default:

Use named IntervalMarkers:

IntervalMarkersStyle  (2)

Interval markers are black by default:

Specify the style for the bars:

Joined  (3)

Datasets are joined by default:

Join the first dataset with a line, but use points for the second dataset:

Join the dataset with a line and show the original points:

PlotLegends  (5)

No legend is used by default:

Generate a legend using labels:

Generate a legend using placeholders:

Use Placed to specify legend placement:

Build a custom legend with BarLegend:

PlotMarkers  (4)

ListLinePlot normally shows just the curves:

Include the data points in the plot:

Change the size of the default plot markers:

Use spheres as markers:

Specify how large the spheres should be:

PlotRange  (3)

Automatically compute the range:

Use all points to compute the range:

Use an explicit range to emphasize features:

PlotStyle  (1)

Plot two point sets with different styles:

PlotTheme  (2)

Use a theme with simple ticks in a bold color scheme:

Change the color for the curves:

RegionBoundaryStyle  (3)

Show the region being plotted:

Use None to not draw the region:

Use a custom RegionBoundaryStyle:

ScalingFunctions  (5)

By default, plots have linear scales in each direction:

Use a log scale in the direction:

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

Use different scales in the , and directions:

Use a scale defined by a function and its inverse:

Applications  (6)

Random Walks  (3)

Visualize a random walk in 3D:

View multiple random walks:

Visualize a random walk on a lattice:

View multiple random walks:

Make a random walk where successive steps change direction by between 0° and 20° in any Euler angle:

Plot multiple walks:

Optimization Paths  (1)

Show the steps used by an optimization method to arrive at a minimum:

Use StepMonitor to follow the progress of FindMinimum from different starting points:

Plot the sequences of steps on the actual surface:

Time Series  (1)

Plot the performance of several companies as separate curves:

Spatial Data  (1)

Find the position of the International Space Station for the next few hours:

Show the path around a simple model of the Earth:

Properties & Relations  (12)

Use ListPlot and ListLinePlot to plot heights in 2D:

Plot points:

Use ListPointPlot3D to show three-dimensional data plots:

Use ListPlot3D to create surfaces from data:

Use Plot3D to visualize functions:

Use ParametricPlot3D to plot a curve from functions:

Use ListLogPlot, ListLogLogPlot and ListLogLinearPlot for logarithmic data plots:

Use ListPolarPlot for polar plots:

Use DateListPlot to show data over time:

Use ListContourPlot to create contours from continuous data:

Use ListDensityPlot to create densities from continuous data:

Use ArrayPlot and MatrixPlot for arrays of discrete values:

Use ParametricPlot for parametric curves:

Wolfram Research (2021), ListLinePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ListLinePlot3D.html.

Text

Wolfram Research (2021), ListLinePlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ListLinePlot3D.html.

CMS

Wolfram Language. 2021. "ListLinePlot3D." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ListLinePlot3D.html.

APA

Wolfram Language. (2021). ListLinePlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListLinePlot3D.html

BibTeX

@misc{reference.wolfram_2022_listlineplot3d, author="Wolfram Research", title="{ListLinePlot3D}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/ListLinePlot3D.html}", note=[Accessed: 04-June-2023 ]}

BibLaTeX

@online{reference.wolfram_2022_listlineplot3d, organization={Wolfram Research}, title={ListLinePlot3D}, year={2021}, url={https://reference.wolfram.com/language/ref/ListLinePlot3D.html}, note=[Accessed: 04-June-2023 ]}