ListFitPlot[{y1,…,yn}]
plots a local regression line for the points {1,y1},…,{n,yn}.
ListFitPlot[{{x1,y1},…,{xn,yn}}]
plots a local regression line for the points {x1,y1},…,{xn,yn}.
ListFitPlot[{data1,data2,…}]
plots local regression lines from all the datai.
ListFitPlot[{…,w[datai,…],…}]
plots datai with features defined by the symbolic wrapper w.


ListFitPlot
ListFitPlot[{y1,…,yn}]
plots a local regression line for the points {1,y1},…,{n,yn}.
ListFitPlot[{{x1,y1},…,{xn,yn}}]
plots a local regression line for the points {x1,y1},…,{xn,yn}.
ListFitPlot[{data1,data2,…}]
plots local regression lines from all the datai.
ListFitPlot[{…,w[datai,…],…}]
plots datai with features defined by the symbolic wrapper w.
Details
















- ListFitPlot is also known as LOESS or regression plot.
- It fits a model to the given data and displays both model and data.
- It illustrates the relationship between data and a model of the data.
- Furthermore, it is easy to show quality measures of the fitted model such as confidence bands or residuals:
- Data values xi and yi can be given in the following forms:
-
xi a real-valued number Quantity[xi,unit] a quantity with a unit xi±ei value xi with uncertainty ei Around[xi,ei] value xi with uncertainty ei Interval[{xmin,xmax}] values between xmin and xmax - The xi and yi can also be dates, times or categorical values if appropriate settings are used for the ScalingFunctions option, or if the type information is available from the tabular data source.
- Values xi and yi that are not of the form above are taken to be missing and are not shown.
- The datai have the following forms and interpretations:
-
<|"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 array TimeSeries, EventSeries time-value pairs QuantityArray magnitudes WeightedData unweighted values - ListFitPlot[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 against column x1, y2 against x2, etc. coly, {coly} plot column y as a sequence of values {{coly1},…,{colyi},…} plot columns y1, y2, etc. 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:
-
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,events] define a general event handler for the data Highlighted[datai,effect] dynamically highlight fi with an effect Highlighted[datai,Placed[effect,pos]] statically highlight fi with an effect at position pos 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 curve - 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 data w[{data1,…}] wrap a collection of datai w1[w2[…]] use nested wrappers - Callout, Labeled and Placed can use the following positions pos:
-
Above position above curve Below position below curve Before position before curve After position after curve "Start" position at start of each curve "End" position at end of each curve x near the curve at a position x Scaled[s] scaled position s along the curve {s,Above} above relative position at position s along the curve {s,Below} below relative position at position s along the curve {pos,epos} epos in label placed at relative position pos of the curve - ListFitPlot has the same options as Graphics, with the following additions and changes: [List of all options]
-
AspectRatio 1/GoldenRatio ratio of height to width Axes True whether to draw axes ClippingStyle None what to draw when lines are clipped ColorFunction Automatic how to determine the coloring of lines ColorFunctionScaling True whether to scale arguments to ColorFunction DataRange Automatic the range of x values to assume for data Filling None filling under each line FillingStyle Automatic style to use for filling InterpolationOrder None the polynomial degree of curves used in joining data points IntervalMarkers Automatic how to render uncertainty IntervalMarkersStyle Automatic style for uncertainty elements LabelingFunction Automatic how to label points LabelingSize Automatic maximum size of callouts and labels MaxPlotPoints Infinity the maximum number of points to include Mesh None how many mesh points to draw on each line MeshFunctions {#1&} how to determine the placement of mesh points MeshShading None how to shade regions between mesh points MeshStyle Automatic the style for mesh points Method Automatic methods to use MultiaxisArrangement None how to arrange multiple axes for data PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotFit Automatic how to fit a curve to the points PlotFitElements Automatic fitted elements to show in the plot PlotHighlighting Automatic highlighting effect for points PlotLabel None overall label for the plot PlotLabels None labels for data PlotLayout "Overlaid" how to position data PlotLegends None legends for data PlotMarkers None markers to use to indicate each point PlotRange Automatic range of values to include PlotRangeClipping True whether to clip at the plot range PlotStyle Automatic graphics directives to determine the style of each line PlotTheme $PlotTheme overall theme for the plot ScalingFunctions None how to scale individual coordinates TargetUnits Automatic units to display in the plot - PlotFitfit determines what method is used to fit a curve to the data.
- Possible settings for fit include:
-
Automatic automatically choose the fitting model "Linear" use linear regression "Quadratic" use a quadratic model "Cubic" use a cubic model "Exponential" use an exponential model model use the provided FittedModel model - The simple models like "Linear" etc. all use LinearModelFit to compute the resulting fitted model.
- PlotFitElementselems controls what visual elements to include for comparing the fitted curve to the original data points.
- Possible settings for elems include:
-
None show only the fitted curve Automatic automatically chosen elements "DataPoints" show the original data "BandCurves" show 95% confidence bands "Residuals" draw residual lines between points and fitted curve {elem,"Style"style,"FillingStyle"fill} use style for the element and fill for the filling style - DataRange determines how values {y1,…,yn} are interpreted into {{x1,y1},…,{xn,yn}}. Possible settings include:
-
Automatic,All uniform from 1 to n {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 DataRangeAll 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.
- Possible settings for PlotLayout that show multiple curves in a single plot panel include:
-
"Overlaid" show all the data overlapping "Stacked" accumulate the data "Percentile" accumulate and normalize the data - Possible settings for PlotLayout that show single curves in multiple plot panels include:
-
"Column" use separate curves in a column of panels "Row" use separate curves in a row of panels {"Column",k},{"Row",k} use k columns or rows {"Column",UpTo[k]},{"Row",UpTo[k]} use at most k columns or rows - Possible keys and values in assoc for specifying regression parameters include:
-
"SmoothingFunction" Automatic use KernelModelFit to draw the regression line "SupportFunction" Automatic local support function to use with Automatic smoothing "GridPoints" Automatic grid points to use for the fit "Bandwidth" Automatic bandwidth to use with the smoothing function "SmoothingOptions" Automatic options for the smoothing function - 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 Placed[effect,pos] statically highlight the given position pos - Typical settings for PlotLegends include:
-
None no legend Automatic automatically determine legend {lbl1,lbl2,…} use lbl1, lbl2, … as legend labels Placed[lspec,…] specify placement for legend - ScalingFunctions->"scale" scales the
coordinate; ScalingFunctions{"scalex","scaley"} scales both the
and
coordinates.
-
AlignmentPoint Center the default point in the graphic to align with AspectRatio 1/GoldenRatio ratio of height to width Axes True whether to draw axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} style specifications for the 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 ClippingStyle None what to draw when lines are clipped ColorFunction Automatic how to determine the coloring of lines ColorFunctionScaling True whether to scale arguments to ColorFunction ContentSelectable Automatic whether to allow contents to be selected CoordinatesToolOptions Automatic detailed behavior of the coordinates tool DataRange Automatic the range of x values to assume for data Epilog {} primitives rendered after the main plot Filling None filling under each line FillingStyle Automatic style to use for filling FormatType TraditionalForm the default format type for text Frame False whether to put a frame around the plot FrameLabel None frame labels FrameStyle {} style specifications for the frame FrameTicks Automatic frame ticks FrameTicksStyle {} style specifications for frame ticks GridLines None grid lines to draw GridLinesStyle {} style specifications for grid lines ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels etc. ImageSize Automatic the absolute size at which to render the graphic InterpolationOrder None the polynomial degree of curves used in joining data points IntervalMarkers Automatic how to render uncertainty IntervalMarkersStyle Automatic style for uncertainty elements LabelingFunction Automatic how to label points LabelingSize Automatic maximum size of callouts and labels LabelStyle {} style specifications for labels MaxPlotPoints Infinity the maximum number of points to include Mesh None how many mesh points to draw on each line MeshFunctions {#1&} how to determine the placement of mesh points MeshShading None how to shade regions between mesh points MeshStyle Automatic the style for mesh points Method Automatic methods to use MultiaxisArrangement None how to arrange multiple axes for data PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotFit Automatic how to fit a curve to the points PlotFitElements Automatic fitted elements to show in the plot PlotHighlighting Automatic highlighting effect for points PlotLabel None overall label for the plot PlotLabels None labels for data PlotLayout "Overlaid" how to position data PlotLegends None legends for data PlotMarkers None markers to use to indicate each point PlotRange Automatic range of values to include PlotRangeClipping True whether to clip at the plot range PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic the final display region to be filled PlotStyle Automatic graphics directives to determine the style of each line PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} primitives rendered before the main plot RotateLabel True whether to rotate y labels on the frame ScalingFunctions None how to scale individual coordinates TargetUnits Automatic units to display in the plot Ticks Automatic axes ticks TicksStyle {} style specifications for axes ticks



List of all options




Examples
open all close allBasic Examples (4)
Scope (13)
General Data (3)
Tabular Data (1)
Special Data (2)
Special Data (7)
Options (36)
DataRange (3)
LabelingFunction (6)
By default, points are automatically labeled with strings:
Use LabelingFunction->None to suppress the labels:
Put the labels to the right of the points:
Use callouts to label the points:
LabelingSize (4)
IntervalMarkers (2)
IntervalMarkersStyle (2)
MultiaxisArrangement (5)
PlotFitElements (2)
PlotLayout (3)
PlotStyle (3)
ScalingFunctions (2)
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:
DateScale ticks are used automatically for TimeSeries data:
History
Text
Wolfram Research (2025), ListFitPlot, Wolfram Language function, https://reference.wolfram.com/language/ref/ListFitPlot.html.
CMS
Wolfram Language. 2025. "ListFitPlot." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ListFitPlot.html.
APA
Wolfram Language. (2025). ListFitPlot. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListFitPlot.html
BibTeX
@misc{reference.wolfram_2025_listfitplot, author="Wolfram Research", title="{ListFitPlot}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/ListFitPlot.html}", note=[Accessed: 04-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_listfitplot, organization={Wolfram Research}, title={ListFitPlot}, year={2025}, url={https://reference.wolfram.com/language/ref/ListFitPlot.html}, note=[Accessed: 04-August-2025]}