FillingStyle
Details
- FillingStyle->g specifies that all filling should be done by default with the specified graphics directive.
- Possible directives include Opacity, Hue, and in the case of ListPlot also Thickness and Dashing.
- Directives can be combined using Directive[g1,g2,…].
- FillingStyle->{g-,g+} specifies that the filling should be done with g- when a point, curve or surface lies below the object being filled to, and with g+ when it lies above.
- Settings of the form
for Filling can be used to override the default style specified by FillingStyle.
Examples
open all close allBasic Examples (3)
Set an explicit FillingStyle:
Plot[Abs[Zeta[1 / 2 + I x]], {x, 0, 50}, Filling -> Axis, FillingStyle -> Yellow]Plot3D[Sin[x + y ^ 2], {x, -2, 2}, {y, -2, 2}, RegionFunction -> (1 < #1 ^ 2 + #2 ^ 2 < 4&), Filling -> Bottom, FillingStyle -> Opacity[0.7], Mesh -> None]Plot[Evaluate[Table[BesselJ[n, x], {n, 3}]], {x, 0, 10}, Filling -> Axis, FillingStyle -> Automatic]ListPlot[Table[{k, PDF[BinomialDistribution[50, p], k]}, {p, {0.3, 0.5, 0.8}}, {k, 0, 50}], Filling -> Axis, FillingStyle -> Automatic]Use automatic filling style together with a ColorFunction:
ListLinePlot[Accumulate[RandomReal[{-1, 1}, 250]], ColorFunction -> "Rainbow", Filling -> Axis]Scope (15)
Filling Limits (4)
Table[Plot[Sin[x], {x, 0, 2Pi}, Filling -> f], {f, {Top, Bottom, Axis, 0.3}}]Overlapping fills by default combine using opacity:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> Axis]Fill between curve 1 and the
axis:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> {1 -> Axis}]Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> {1 -> {2}}]Filling Style (8)
Fill between curves 1 and 2 with a specific style:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> {1 -> {{2}, Yellow}}]Fill between curves 1 and
with yellow:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> {1 -> {1 / 2, Yellow}}]Fill between curves 1 and 2; use yellow when 1 is below 2, and green when 1 is above 2:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> {1 -> {{2}, {Yellow, Green}}}]Use an overall FillingStyle specification:
Plot[Sin[x], {x, 0, 2Pi}, Filling -> Axis, FillingStyle -> Green]Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> Axis, FillingStyle -> Directive[Opacity[0.5], Green]]When FillingStyle is used together with styles in Filling, the latter takes priority:
Plot[{Sin[x], Cos[x]}, {x, 0, 2Pi}, Filling -> {1 -> Axis, 2 -> {Axis, Yellow}}, FillingStyle -> Green]Fill with green below the
axis, and yellow above:
Plot[Sin[x], {x, 0, 2Pi}, Filling -> Axis, FillingStyle -> {Green, Yellow}]Use a variable filling style obtained from a ColorFunction:
Plot[Sin[x], {x, 0, 2Pi}, ColorFunction -> Function[{x, y}, Hue[y]], Filling -> Axis, FillingStyle -> Automatic]Plot Functions (3)
Point-oriented plot functions will fill using a stem:
ListPlot[Table[{k, PDF[BinomialDistribution[50, p], k]}, {p, {0.3, 0.5, 0.8}}, {k, 0, 50}], Filling -> Axis]Line-oriented plot functions will fill using an area:
ListLinePlot[Table[{k, PDF[BinomialDistribution[50, p], k]}, {p, {0.3, 0.5, 0.8}}, {k, 0, 50}], Filling -> Axis]Surface-oriented plot functions will fill along the boundary:
Plot3D[Sin[x + y ^ 2], {x, -2, 2}, {y, -2, 2}, RegionFunction -> (1 < #1 ^ 2 + #2 ^ 2 < 4&), Filling -> Bottom, FillingStyle -> Opacity[0.7], Mesh -> None]Tech Notes
Related Guides
History
Text
Wolfram Research (2007), FillingStyle, Wolfram Language function, https://reference.wolfram.com/language/ref/FillingStyle.html.
CMS
Wolfram Language. 2007. "FillingStyle." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/FillingStyle.html.
APA
Wolfram Language. (2007). FillingStyle. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FillingStyle.html
BibTeX
@misc{reference.wolfram_2026_fillingstyle, author="Wolfram Research", title="{FillingStyle}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/FillingStyle.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_fillingstyle, organization={Wolfram Research}, title={FillingStyle}, year={2007}, url={https://reference.wolfram.com/language/ref/FillingStyle.html}, note=[Accessed: 12-June-2026]}