StackedListPlot [{data1,data2,…}]
plots lines for each of the datai, with the i^(th) curve being the accumulation of values in data1 through datai.
StackedListPlot [{…,w[datai],…}]
plots datai with features defined by the symbolic wrapper w.
StackedListPlot
StackedListPlot [{data1,data2,…}]
plots lines for each of the datai, with the i^(th) curve being the accumulation of values in data1 through datai.
StackedListPlot [{…,w[datai],…}]
plots datai with features defined by the symbolic wrapper w.
Details and Options
- The datai have the following forms and interpretations:
-
{y1,y2,…} heights {y1,y2,…} with automatic x values{{x1,y1},{x2,y2},…} values {{x1,y1},{x2,y2},…}<|"k1"y1,"k2"y2,…|> values {y1,y2,…}<|x1y1,x2y2,…|> key-value pairs {{x1,y1},{x2,y2},…}{y1"lbl1",y2"lbl2",…}, {y1,y2,…}{"lbl1","lbl2",…} values {y1,y2,…} with labels {lbl1,lbl2,…}SparseArray values as a normal arrayQuantityArray magnitudesWeightedData unweighted values
- Data values xi and yi can be given in the following forms:
-
xi a real-valued number
- If necessary, the data will be sorted according to the xi.
- The positive part of each datai is plotted on the positive axis and the negative part on the negative axis.
- Negative values of yi stack in the opposite direction from positive values.
- Values xi and yi that are not of the preceding form are taken to be missing and are not shown. Missing data is taken to be zero for accumulation purposes.
- StackedListPlot [Tabular […]cspec] extracts and plots values from the tabular object using the column specification cspec.
- The following forms of column specifications cspec are allowed for plotting tabular data:
-
{colx,coly} plot column y against column x{{colx1,coly1},{colx2,coly2},…} plot column y1 agains column x1, y2 against x2, …coly, {coly} plot column y as a sequence of values{{coly1},…,{colyi},…} plot columns y1, y2, … as sequences of values
- The colx can also be Automatic , in which case sequential values are generated using DataRange .
- The following wrappers w can be used for the datai:
-
- Wrappers w can be applied at multiple levels:
-
{…,w[yi],…} wrap the value yi in data{…,w[{xi,yi}],…} wrap the point {xi,yi}w[datai] wrap the dataw[{data1,…}] wrap a collection of dataiw1[w2[…]] use nested wrappers
- Callout , Labeled and Placed can use the following positions pos:
-
Automatic automatically placed labelsx near the curve at a position x{pos,epos} epos in label placed at relative position pos of the curve
- StackedListPlot has the same options as Graphics , with the following additions and changes: [List of all options]
-
- DataRange determines how values {y1,…,yn} are interpreted into {{x1,y1},…,{xn,yn}}. Possible settings include:
-
{xmin,xmax} uniform from xmin to xmax
- In general, a list of pairs {{x1,y1},{x2,y2},…} is interpreted as a list of points, but the setting DataRange All forces it to be interpreted as multiple data sources {{y11,y12},{y21,y23},…}.
- LabelingFunction->f specifies that each point should have a label given by f[value,index,lbls], where value is the value associated with the point, index is its position in the data, and lbls is the list of relevant labels.
- The following settings for PlotLayout can be used to display multiple sets of data:
-
"Stacked" accumulate the data per axis"Percentile" accumulate and normalize the data per axis
- Typical settings for PlotLegends include:
-
None no legendAutomatic automatically determine legend{lbl1,lbl2,…} use lbl1, lbl2, … as legend labels
- ColorData ["DefaultPlotColors"] gives the default sequence of colors used by PlotStyle .
- ScalingFunctions->"scale" scales the coordinate; ScalingFunctions {"scalex","scaley"} scales both the and coordinates.
- Possible highlighting effects for Highlighted and PlotHighlighting include:
-
style highlight the indicated curve"Ball" highlight and label the indicated point in a curve"Dropline" highlight and label the indicated point in a curve with droplines to the axes"XSlice" highlight and label all points along a vertical slice"YSlice" highlight and label all points along a horizontal slice
- Highlight position specifications pos include:
-
x, {x} effect at {x,y} with y chosen automatically{x,y} effect at {x,y}{pos1,pos2,…} multiple positions posi
- Highlight options with settings specific to StackedListPlot
-
ImageMargins 0. the margins to leave around the graphicPlotLayout "Stacked" how to position dataPreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic
List of all options
Examples
open all close allBasic Examples (4)
Plot a stacked list of values:
Plot a stacked list of , pairs:
Identify the data with callouts:
Plot values including units:
Scope (30)
General Data (5)
Lines are constructed taking into account points in all datasets:
Missing values are taken to be zero:
Negative points are stacked in the opposite direction:
Change the layout to show data as percentiles:
Use ScalingFunctions to scale the axes:
Tabular Data (1)
Get tabular data for historical populations of several countries:
Plot the total populations of France, UK and Japan from 1940 to 2020:
Show the populations as percentages of the total:
Include legends for the plot, using the column names:
Special Data (5)
Use Quantity to include units with the data:
Specify strings to use as labels:
Specify a location for labels:
Plot TimeSeries directly:
Plot data with uncertainty:
Use intervals:
Data Wrappers (3)
Use wrappers on data sources or collections of data sources:
Use the value of each point as a tooltip:
Use a specific tooltip for the curve:
Use PopupWindow to provide additional drilldown information:
Button can be used to trigger any action:
Labeling and Legending (10)
Label data sources with Labeled :
Specify the labels with PlotLabels :
Label data automatically with Callout :
Include legends for each curve:
Specify the maximum size of labels:
Use the full label:
For dense sets of points, some labels may be turned into tooltips by default:
Increasing the size of the plot will show more labels:
Use Legended to provide a legend for a specific dataset:
Use Placed to change the legend location:
Use association keys as labels:
Plots usually have interactive callouts showing the coordinates when you mouse over them:
Including specific wrappers or interactions, such as tooltips, turns off the interactive features:
Choose from multiple interactive highlighting effects:
Use Highlighted to emphasize specific points in a plot:
Highlight multiple points:
Presentation (6)
Multiple curves are automatically colored to be distinct:
Provide explicit styling to different curves:
Use a theme with simple ticks in a bold color scheme:
Add labels to the plot:
Add tooltips to the data:
Fill between specific curves:
Create an overlay mesh:
Style the curve segments between mesh points:
Options (95)
AspectRatio (4)
By default, StackedListPlot uses a fixed height-to-width ratio for the plot:
Make the height the same as the width with AspectRatio 1:
AspectRatio Automatic determines the ratio from the plot ranges:
AspectRatio Full adjusts the height and width to tightly fit inside other constructs:
Axes (3)
AxesLabel (4)
No axes labels are drawn by default:
Place a label on the axis:
Specify axes labels:
Use units as labels:
AxesOrigin (2)
The position of the axes is determined automatically:
Specify an explicit origin for the axes:
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:
ClippingStyle (1)
Omit clipped regions of the plot:
Show the clipped regions like the rest of the curve:
Show clipped regions with red lines:
Show clipped regions as red at the bottom and thick at the top:
Show clipped regions as red and thick:
DataRange (4)
Lists of height values are displayed against the number of elements:
Rescale to the sampling space:
Each dataset is scaled to the same domain:
Pairs are interpreted as , coordinates:
Specifying DataRange in this case has no effect, since values are part of the data:
Force interpretation as multiple datasets:
Filling (3)
Use symbolic or explicit values:
Fills that overlap by default combine using opacity:
Fill between the first curve and the axis:
Fill between two lines:
Fill between curves 1 and 2 with a specific style:
Fill between curves 1 and with light orange:
FillingStyle (2)
Use different fill colors:
Fill with opacity 0.5 orange:
Fill with red below the axis and with blue above:
Use a variable filling style obtained from ColorFunction :
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:
Setting AspectRatio Full will fill the available space:
Use maximum sizes for the width and height:
Use ImageSize Full to fill the available space in an object:
Specify the image size as a fraction of the available space:
InterpolationOrder (1)
Points are normally joined with straight lines:
Use quadratic spline interpolation to fit the data:
Use flat regions with steps at each data point:
IntervalMarkers (3)
By default, uncertainties are capped:
Use bars to denote uncertainties without caps:
Use bands to represent uncertainties:
IntervalMarkersStyle (2)
Uncertainties automatically inherit the plot style:
Specify the style for uncertainties:
LabelingFunction (1)
By default, points are automatically labeled with strings:
Use LabelingFunction->None to suppress the labels:
Put the labels above the points:
Use callouts to label the points:
Label the points with their values:
Label the points with their indices:
LabelingSize (4)
Textual labels are shown at their actual sizes:
Image labels are automatically resized:
Specify a maximum size for textual labels:
Specify a maximum size for image labels:
Show image labels at their natural sizes:
LabelingTarget (6)
Labels are automatically placed to maximize readability:
Show all labels:
Use a denser layout for the labels:
Show the half of the labels that are easiest to read:
Only allow labels that are orthogonal to the points:
Only allow labels that are diagonal to the points:
Allow labels to be clipped by the edges of the plot:
MaxPlotPoints (1)
All points are included by default:
Uniformly spaced data is downsampled:
Mesh (1)
The initial and final sampling meshes are typically the same:
Interpolated data may introduce points:
Use 20 mesh levels evenly spaced in the direction:
Use an explicit list of values for the mesh in the direction:
Specify style and mesh levels in the direction:
MeshFunctions (1)
Use a mesh evenly spaced in the and directions:
Show 5 mesh levels in the direction (red) and 10 in the direction (blue):
MeshShading (1)
Alternate red and blue segments of equal width in the direction:
Use None to remove segments:
MeshShading can be used with PlotStyle :
MeshShading has higher priority than PlotStyle for styling the curve:
Use PlotStyle for some segments by setting MeshShading to Automatic :
MeshShading can be used with ColorFunction :
MeshStyle (1)
Color the mesh the same color as the plot:
Use a red mesh in the direction:
Use a red mesh in the direction and a blue mesh in the direction:
Use big red mesh points in the direction:
PlotHighlighting (7)
Plots have interactive coordinate callouts with the default setting PlotHighlighting Automatic :
Use PlotHighlighting None to disable the highlighting for the entire plot:
Use Highlighted […,None ] to disable highlighting for a single set:
Move the mouse over the curve to highlight it with a label and droplines to the axes:
Use a ball and label to highlight a specific point in the plot:
Move the mouse over the plot to highlight it with a slice showing values corresponding to the position:
Highlight a particular set of points at a fixed value:
Move the mouse over the plot to highlight it with a slice showing values corresponding to the position:
Use a component that shows the points on the plot closest to the position of the mouse cursor:
Specify the style for the points:
Use a component that shows the coordinates on the points closest to the mouse cursor:
Use Callout options to change the appearance of the label:
Combine components to create a custom effect:
PlotInteractivity (4)
Plots have interactive highlighting by default:
Turn off all the interactive elements:
Interactive elements provided as part of the input are disabled:
Allow provided interactive elements and disable automatic ones:
PlotLabel (1)
Add an overall label to the plot:
PlotLabels (5)
Specify text to label sets of points:
Place the labels above the points:
Use callouts to identify the datasets:
Label curves with the keys from an association:
Use None to not label a data source:
PlotLayout (1)
PlotLegends (1)
Generate a legend using labels:
Generate a legend using placeholders:
Legends use the same styles as the plot:
Use Placed to specify legend placement:
Place the legend inside the plot:
Use LineLegend to change the legend appearance:
PlotMarkers (8)
ListLinePlot normally uses distinct colors to distinguish different sets of data:
Automatically use colors and shapes to distinguish sets of data:
Use shapes only:
Change the size of the default plot markers:
Use arbitrary text for plot markers:
Use explicit graphics for plot markers:
Use the same symbol for all the sets of data:
Explicitly use a symbol and size:
PlotRange (1)
PlotRange shows all data by default:
Calculate automatic range:
PlotStyle (4)
Use different style directives:
By default, different styles are chosen for multiple curves:
Explicitly specify the style for different curves:
PlotStyle can be combined with ColorFunction :
PlotStyle can be combined with MeshShading :
PlotTheme (3)
Use a theme with simple styling and plot markers in a bright color scheme:
Change the color scheme:
Use a theme with minimal styling:
ScalingFunctions (3)
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 a reciprocal scale in the direction:
Use different scales in the and directions:
Reverse the axis without changing the axis:
Use a scale defined by a function and its inverse:
Positions in Ticks and GridLines are automatically scaled:
PlotRange and AxesOrigin are automatically scaled:
TargetUnits (1)
Automatically detect units:
Specify alternate units:
Applications (3)
Apple revenues by product:
Apple unit sales by product:
Percentage of world GDP share by region over time:
Percentage of world GDP share by country over time:
Related Guides
History
Introduced in 2017 (11.2) | Updated in 2018 (11.3) ▪ 2019 (12.0) ▪ 2021 (13.0) ▪ 2023 (13.3) ▪ 2025 (14.2) ▪ 2025 (14.3)
Text
Wolfram Research (2017), StackedListPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/StackedListPlot.html (updated 2025).
CMS
Wolfram Language. 2017. "StackedListPlot." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/StackedListPlot.html.
APA
Wolfram Language. (2017). StackedListPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StackedListPlot.html
BibTeX
@misc{reference.wolfram_2025_stackedlistplot, author="Wolfram Research", title="{StackedListPlot}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/StackedListPlot.html}", note=[Accessed: 04-January-2026]}
BibLaTeX
@online{reference.wolfram_2025_stackedlistplot, organization={Wolfram Research}, title={StackedListPlot}, year={2025}, url={https://reference.wolfram.com/language/ref/StackedListPlot.html}, note=[Accessed: 04-January-2026]}