Periodogram[list]
plots the squared magnitude of the discrete Fourier transform (power spectrum) of list.
Periodogram[list,n]
plots the mean of power spectra of non-overlapping partitions of length n.
Periodogram[list,n,d]
uses partitions with offset d.
Periodogram[list,n,d,wfun]
applies a smoothing window wfun to each partition.
Periodogram[list,n,d,wfun,m]
pads partitions with zeros to length m prior to the computation of the transform.
Periodogram[{list1,list2,…},n,d,wfun,m]
plots power spectra of several lists.
Periodogram[audio,…]
plots the power spectrum of audio.
Periodogram[video,…]
plots the power spectrum of the first audio track in video.
Periodogram[{input1,input2,…},…]
plots the power spectra of all inputi.
Periodogram
Periodogram[list]
plots the squared magnitude of the discrete Fourier transform (power spectrum) of list.
Periodogram[list,n]
plots the mean of power spectra of non-overlapping partitions of length n.
Periodogram[list,n,d]
uses partitions with offset d.
Periodogram[list,n,d,wfun]
applies a smoothing window wfun to each partition.
Periodogram[list,n,d,wfun,m]
pads partitions with zeros to length m prior to the computation of the transform.
Periodogram[{list1,list2,…},n,d,wfun,m]
plots power spectra of several lists.
Periodogram[audio,…]
plots the power spectrum of audio.
Periodogram[video,…]
plots the power spectrum of the first audio track in video.
Periodogram[{input1,input2,…},…]
plots the power spectra of all inputi.
Details and Options
- Periodogram shows the frequency content of a signal by plotting the magnitude squared of the discrete Fourier transform.
- In Periodogram[list,n,d,wfun], the smoothing window wfun can be specified using a window function that will be sampled between
and
, or a list of length n. The default window is DirichletWindow, which effectively does no smoothing. - Periodogram[list,n] is equivalent to Periodogram[list,n,n,DirichletWindow,n].
- Periodogram works with numeric lists as well as Audio and Sound objects.
- For a multichannel sound object, Periodogram plots power spectra of all channels.
- For real input data, Periodogram displays only the first half of the power spectrum due to the symmetry property of the Fourier transform.
- Compute the effective power spectrum using PeriodogramArray.
- Periodogram takes the following options:
-
FourierParameters {0,1} Fourier parameters SampleRate Automatic the sample rate ScalingFunctions {"Linear","dB"} the scaling function - With the setting SampleRate->r, signal frequencies are shown in the range from 0 to r/2.
- Possible settings for ScalingFunctions include:
-
Automatic automatic scaling None linear scaling for
axis and absolute scaling for
axissy
axis scaling{sx}
axis scaling {sx,sy} different scaling functions for the
and
directions - Possible magnitude scalings sy include:
-
"Absolute" absolute scaling "dB"
decibel scaling (default){f,f-1} arbitrary scaling using the function f and its inverse - Possible frequency scalings sx include:
-
"Linear" linear scaling (default) "Log10"
scaling{f,f-1} arbitrary scaling using the function f and its inverse - The scaling function can be "dB" or "Absolute", which correspond to the decibel and absolute power values, respectively.
- Periodogram also accepts all options of ListLinePlot.
Examples
open all close allBasic Examples (3)
Power spectrum of a noisy dataset:
data = Table[2 Sin[0.2 π n ] + Sin[0.5 π n] + RandomReal[{-1, 1}], {n, 0, 127}];
Periodogram[data]Periodogram of a Sound object:
Periodogram[ExampleData[{"Sound", "Apollo11ReturnSafely"}]]Power spectrum of an Audio object:
Periodogram[ExampleData[{"Audio", "Piano"}]]Scope (4)
Bartlett's method averages over non-overlapping partitions:
data = Table[2 Sin[0.2 π n ] + Sin[0.35 π n] + RandomReal[{-1, 1}], {n, 0, 255}];
Periodogram[data, 64, PlotRange -> All]Average overlapping partitions:
Periodogram[data, 64, 32, PlotRange -> All]Welch's method averages over smoothed overlapping partitions:
Periodogram[data, 64, 32, HammingWindow, PlotRange -> All]Pad each partition to increase plot density:
Periodogram[data, 64, 32, HammingWindow, 256, PlotRange -> All]Power spectrum of two dual-tone multi-frequency (DTMF) signals:
Periodogram[{Table[Sin[2 Pi 697 t] + Sin[2 Pi 1209 t], {t, 0., 0.1, 1 / 8000.}], Table[Sin[2 Pi 852 t] + Sin[2 Pi 1336 t], {t, 0., 0.1, 1 / 8000.}]}]Periodogram of a multichannel audio object:
a = Audio[{Table[Sin[2 π 697 t] + Sin[2 π 1209 t], {t, 0., 0.3, 1 / 8000.}], Table[Sin[2 π 941 t] + Sin[2 π 1477 t], {t, 0., 0.3, 1 / 8000.}]}, SampleRate -> 8000]Periodogram[a]Periodogram of the audio track of a video:
Periodogram[\!\(\*VideoBox[""]\)]Options (33)
AspectRatio (3)
By default, Periodogram uses a fixed height-to-width ratio for the plot:
Periodogram[IconizedObject[«data»]]Make the height the same as the width with AspectRatio1:
Periodogram[IconizedObject[«data»], AspectRatio -> 1]AspectRatioFull adjusts the height and width to tightly fit inside other constructs:
plot = Periodogram[IconizedObject[«data»], AspectRatio -> Full];{Framed[Pane[plot, {50, 100}]], Framed[Pane[plot, {100, 100}]], Framed[Pane[plot, {100, 50}]]}Axes (3)
By default, Axes are drawn:
Periodogram[IconizedObject[«data»]]Use AxesFalse to turn off axes:
Periodogram[IconizedObject[«data»], Axes -> False]Turn on each axis individually:
{Periodogram[IconizedObject[«data»], Axes -> {True, False}], Periodogram[IconizedObject[«data»], Axes -> {False, True}]}AxesLabel (3)
AxesOrigin (2)
AxesStyle (3)
Change the style for the axes:
Periodogram[IconizedObject[«data»], AxesStyle -> Red]Specify the style of each axis:
Periodogram[IconizedObject[«data»], AxesStyle -> {{Thick, Red}, {Thick, Blue}}]Use different styles for the ticks and the axes:
Periodogram[IconizedObject[«data»], AxesStyle -> Green, TicksStyle -> Red]DataRange (1)
FourierParameters (1)
Changing the a parameter in FourierParameters will change the scaling:
data = Table[ Sin[n] + RandomReal[{-1, 1}], {n, 0, 127}];Table[Periodogram[data, ScalingFunctions -> "Absolute", FourierParameters -> {a, 1}, PlotRange -> All], {a, {0, 1}}]ImageSize (7)
Use named sizes such as Tiny, Small, Medium and Large:
{Periodogram[IconizedObject[«data»], ImageSize -> Tiny], Periodogram[IconizedObject[«data»], ImageSize -> Small]}Specify the width of the plot:
{Periodogram[IconizedObject[«data»], ImageSize -> 150], Periodogram[IconizedObject[«data»], AspectRatio -> 1.5, ImageSize -> 150]}Specify the height of the plot:
{Periodogram[IconizedObject[«data»], ImageSize -> {Automatic, 150}], Periodogram[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> {Automatic, 150}]}Allow the width and height to be up to a certain size:
{Periodogram[IconizedObject[«data»], ImageSize -> UpTo[200]], Periodogram[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> UpTo[200]]}Specify the width and height for a graphic, padding with space if necessary:
Periodogram[IconizedObject[«data»], ImageSize -> {200, 200}, Background -> StandardYellow]Setting AspectRatioFull will fill the available space:
Periodogram[IconizedObject[«data»], AspectRatio -> Full, ImageSize -> {200, 200}, Background -> StandardYellow]Use maximum sizes for the width and height:
{Periodogram[IconizedObject[«data»], ImageSize -> {UpTo[150], UpTo[100]}], Periodogram[IconizedObject[«data»], AspectRatio -> 2, ImageSize -> {UpTo[150], UpTo[100]}]}Use ImageSizeFull to fill the available space in an object:
Framed[Pane[Periodogram[IconizedObject[«data»], ImageSize -> Full, Background -> StandardYellow], {200, 100}]]Specify the image size as a fraction of the available space:
Framed[Pane[Periodogram[IconizedObject[«data»], AspectRatio -> Full, ImageSize -> {Scaled[0.5], Scaled[0.5]}, Background -> StandardYellow], {200, 100}]]SampleRate (1)
By default, Periodogram assumes a sampling rate of one sample per time unit:
data = Table[2 Sin[0.2 π n ] + Sin[0.5 π n] + RandomReal[{-1, 1}], {n, 0, 127}];
Periodogram[data]Specify a different sample rate:
Periodogram[data, SampleRate -> 8]ScalingFunctions (1)
By default, Periodogram shows the decibel values of magnitude:
data = Table[Sin[ n] + Sin[2.5 n], {n, 0, 800}];
Periodogram[data]Show the absolute values of the periodogram magnitude:
Periodogram[data, ScalingFunctions -> "Absolute"]Ticks (4)
Ticks are placed automatically in each plot:
Periodogram[IconizedObject[«data»]]Use TicksNone to not draw any tick marks:
Periodogram[IconizedObject[«data»], Ticks -> None]Place tick marks at specific positions:
Periodogram[IconizedObject[«data»], Ticks -> {{.1, .3, .4}, {-20, -5, 15}}]Draw tick marks at the specified positions with the specified labels:
Periodogram[IconizedObject[«data»], Ticks -> {{{.1, a}, {.3, b}, {.4, c}}, {{-20, -d}, {-5, -e}, {15, f}}}]TicksStyle (4)
Specify the overall tick style, including the tick labels:
Periodogram[IconizedObject[«data»], TicksStyle -> Directive[Red, Thick]]Specify the overall tick style for each of the axes:
Periodogram[IconizedObject[«data»], TicksStyle -> {Directive[Blue, Thick], Directive[Red, Thick]}]Specify tick marks with scaled lengths:
Periodogram[IconizedObject[«data»], Ticks -> {{{.1, a, .2}, {.3, b, {0, .07}}, {.4, c, {0, .14}}}, {{-20, -d, .03}, {-5, -e, .1}, {15, f, .19}}}]Customize each tick with position, length, labeling and styling:
Periodogram[IconizedObject[«data»], Ticks -> {{{.1, a, .2, Directive[Red, Thick]}, {.3, b, {0, .07}, Directive[Red, Thick]}, {.4, c, {0, .14}, Directive[Red, Thick]}}, {{-20, -d, .03, Directive[Blue, Thick]}, {-5, -e, .1, Directive[Red, Thick]}, {15, f, .19, Directive[Red, Thick, Dashed]}}}]Properties & Relations (1)
Periodogram plots the magnitude squared of the Fourier transform:
data = Table[2 Sin[0.2 π n] + Sin[0.5 π n] + RandomReal[{-1, 1}], {n, 0, 127}];
{Periodogram[data], ListLinePlot[Take[20Log[10, Abs[Fourier[data]]], 64], DataRange -> {0., 0.5}]}Possible Issues (2)
When an explicit DataRange is specified, the SampleRate setting is ignored:
data = Table[2 Sin[0.2 π n] + Sin[0.5 π n] + RandomReal[{-1, 1}], {n, 0, 127}];
Periodogram[data, SampleRate -> 1, DataRange -> {0, Pi}, PlotRange -> All]For very large partitions with a smoothing window, timing is increased due to sampling of the window:
list = RandomReal[1, 1000000];AbsoluteTiming[Periodogram[list, 100000, Automatic, HannWindow]]Specify a smaller partition size:
AbsoluteTiming[Periodogram[list, 1000, Automatic, HannWindow]]Timing will be even worse with no partitioning:
AbsoluteTiming[Periodogram[list, Automatic, Automatic, HannWindow]]See Also
PeriodogramArray ImagePeriodogram Fourier Spectrogram DirichletWindow FindRepeat
Function Repository: IrregularPeriodogram
History
Introduced in 2012 (9.0) | Updated in 2014 (10.0) ▪ 2016 (11.0) ▪ 2024 (14.1)
Text
Wolfram Research (2012), Periodogram, Wolfram Language function, https://reference.wolfram.com/language/ref/Periodogram.html (updated 2024).
CMS
Wolfram Language. 2012. "Periodogram." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2024. https://reference.wolfram.com/language/ref/Periodogram.html.
APA
Wolfram Language. (2012). Periodogram. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Periodogram.html
BibTeX
@misc{reference.wolfram_2026_periodogram, author="Wolfram Research", title="{Periodogram}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/Periodogram.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_periodogram, organization={Wolfram Research}, title={Periodogram}, year={2024}, url={https://reference.wolfram.com/language/ref/Periodogram.html}, note=[Accessed: 13-June-2026]}