({{, (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd] 
plots the basis tree of wavelet matrix coefficients in the (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) dwd.}, {, (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd,r]
plots coefficients up to refinement level r.}, {, (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd,r,func]
applies func to coefficients before plotting. }})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot]) generates a single plot using a pyramid of matrix plots.

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd] is equivalent to (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd,(RefLink[Automatic, paclet:ref/Automatic])], corresponding to the basis of coefficients used in the (RefLink[InverseWaveletTransform, paclet:ref/InverseWaveletTransform]).

The wavelet indices used in the (RefLink[Automatic, paclet:ref/Automatic]) setting are given by dwd["BasisIndex"].

The dwd should be generated from matrix data and produced by (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]), (RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform]), or (RefLink[LiftingWaveletTransform, paclet:ref/LiftingWaveletTransform]).

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd,r] plots basis coefficients up to refinement level r when dwd comes from (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]) or (RefLink[LiftingWaveletTransform, paclet:ref/LiftingWaveletTransform]).

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd,r] plots all coefficients at refinement level r when dwd comes from (RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform]).

In (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd,r,func], each func[(Subscript[coef, i]),(Subscript[wind, i])] should yield an array with the same dimensions as (Subscript[coef, i]).

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot]) has the same options as (RefLink[MatrixPlot, paclet:ref/MatrixPlot]), with the following additions and changes:

Possible settings for (RefLink[PlotLayout, paclet:ref/PlotLayout]) include: "Pyramid" and "Grid".

With the setting (RefLink[GridLines, paclet:ref/GridLines])->(RefLink[Automatic, paclet:ref/Automatic]), grid lines are drawn between adjacent coefficient matrices.

The (RefLink[Automatic, paclet:ref/Automatic]) setting for (RefLink[Ticks, paclet:ref/Ticks]) and (RefLink[FrameTicks, paclet:ref/FrameTicks]) draws ticks corresponding to refinement levels.

With the setting (RefLink[Method, paclet:ref/Method])->"InverseTransform", the inverse transform of each coefficient array will be plotted.

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot]) returns a (RefLink[Graphics, paclet:ref/Graphics]) object.

OpenersPrimaryExamplesSection(Spacer1)Examples  (33)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Plot wavelet matrix coefficients in a pyramid layout:

dwd=DiscreteWaveletTransform[CrossMatrix[5],Automatic,2];

WaveletMatrixPlot[dwd]

Plot wavelet matrix coefficients in a grid layout:

WaveletMatrixPlot[dwd,PlotLayout->"Grid"]

Plot a full tree of wavelet packet coefficients at different refinement levels:

dwd=DiscreteWaveletPacketTransform[CrossMatrix[5]];

Table[WaveletMatrixPlot[dwd,r,PlotLabel->r],{r,3}]

OpenersExampleSection1(Spacer1)Scope  (11)

OpenersExampleSubsection0(Spacer1)Data  (6)

(RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]) of matrix data:

dwd=DiscreteWaveletTransform[(({{0, 0, 1, 0, 0}, {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}, {0, 1, 1, 1, 0}, {0, 0, 1, 0, 0}}))];

Plot matrix wavelet coefficients in a hierarchical grid with wavelet index as a tooltip:

WaveletMatrixPlot[dwd]

The plotted coefficients are the (RefLink[Automatic, paclet:ref/Automatic]) coefficients used in the inverse transform:

First/@dwd[Automatic]

Use (RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot])[dwd,r] to plot coefficients only up to refinement level r:

dwd=DiscreteWaveletTransform[DiamondMatrix[32]];

Table[WaveletMatrixPlot[dwd,r,PlotLabel->r],{r,3}]

The hierarchical layout corresponds to the tree structure of the wavelet coefficients:

Table[DiscreteWaveletTransform[DiamondMatrix[32],Automatic,r][{"TreeView",Right}],{r,3}]

(RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform]) of matrix data:

dwd=DiscreteWaveletPacketTransform[CrossMatrix[32],Automatic,3]

The (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData]) object contains a full tree of coefficients at each level:

Table[WaveletMatrixPlot[dwd,r,PlotLabel->r],{r,3}]

Default (RefLink[Automatic, paclet:ref/Automatic]) coefficients for packet transform correspond to the highest refinement level:

dwd=DiscreteWaveletPacketTransform[DiskMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd]

(RefLink[WaveletBestBasis, paclet:ref/WaveletBestBasis]) computes a different (RefLink[Automatic, paclet:ref/Automatic]) tree of coefficients:

WaveletMatrixPlot[WaveletBestBasis[dwd]]

Specify a function f to apply to wavelet coefficients before plotting:

dwd=DiscreteWaveletTransform[DiskMatrix[32],Automatic,3];

Table[WaveletMatrixPlot[dwd,Automatic,f[#]&,PlotLabel->f],{f,{Identity,Minus,Exp}}]

"Grid" layout is used to plot coefficients from (RefLink[StationaryWaveletTransform, paclet:ref/StationaryWaveletTransform]):

swd = StationaryWaveletTransform[Table[Sin[x y/100],{x,-50,50},{y,-50,50}],SymletWavelet[2],3]

WaveletMatrixPlot[swd]

OpenersExampleSubsection1(Spacer1)Presentation  (5)

Add labels:

dwd=DiscreteWaveletTransform[DiskMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,AxesLabel->{(Subscript[r, x]),(Subscript[r, y])},PlotLabel->"disk matrix"]

Use a named color gradient:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,ColorFunction->"SolarColors"]

WaveletMatrixPlot[dwd,PlotLayout->"Grid",ColorFunction->"SolarColors"]

Include a frame:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,Frame->True]

Place ticks indicating refinement level on all sides:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,Frame->True,FrameTicks->All]

Specify an overall style for grid lines separating wavelet coefficients:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,GridLinesStyle->Directive[Dashed,Purple]]

OpenersExampleSection2(Spacer1)Generalizations & Extensions  (3)

Data need not be square:

data=Table[a^b,{a,1,3},{b,0,8}];

MatrixPlot[data,FrameTicks->None]

Plot rectangular coefficients in a hierarchical grid layout:

dwd=DiscreteWaveletTransform[data];

WaveletMatrixPlot[dwd]

(RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform]) of complex data:

dwd=DiscreteWaveletTransform[Table[Exp[I x/y],{x,10},{y,10}]]

Specify a real-valued function to apply to complex data before plotting:

Table[WaveletMatrixPlot[dwd,Automatic,f[#]&,PlotLabel->f],{f,{Abs,Arg,Im}}]

By default, (RefLink[Re, paclet:ref/Re]) is applied:

{WaveletMatrixPlot[dwd],WaveletMatrixPlot[dwd,Automatic,Re[#]&]}

Use a theme with minimal styling:

dwd=DiscreteWaveletTransform[Table[Exp[I x/y],{x,10},{y,10}]]

WaveletMatrixPlot[dwd,PlotTheme->"Minimal"]

OpenersExampleSection3(Spacer1)Options  (11)

OpenersExampleSubsection2(Spacer1)Axes  (1)

Plot with no axes:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,Axes->False]

WaveletMatrixPlot[dwd,PlotLayout->"Grid",Axes->False]

OpenersExampleSubsection3(Spacer1)ColorFunction  (1)

Specify a function to determine the colors of coefficients:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,ColorFunction->Hue]

WaveletMatrixPlot[dwd,PlotLayout->"Grid",ColorFunction->Hue]

Use a named color function:

WaveletMatrixPlot[dwd,ColorFunction->"Rainbow"]

OpenersExampleSubsection4(Spacer1)Frame  (1)

Include a frame:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,Frame->True]

WaveletMatrixPlot[dwd,PlotLayout->"Grid",Frame->True]

OpenersExampleSubsection5(Spacer1)FrameTicks  (2)

Draw no frame ticks:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,Frame->True,FrameTicks->None]

Draw frame ticks indicating refinement level on all sides:

WaveletMatrixPlot[dwd,Frame->True,FrameTicks->All]

Draw frame ticks only on the specified sides:

WaveletMatrixPlot[dwd,Frame->True,FrameTicks->{{True,True},{False,False}}]

WaveletMatrixPlot[dwd,1,PlotLayout->"Grid",Frame->True]

Draw tick marks at the specified positions:

dwd=DiscreteWaveletTransform[CrossMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,Frame->True,FrameTicks->{{{1,3},None},{{1},{2}}}]

Draw tick marks at the specified positions with the specified labels:

WaveletMatrixPlot[dwd,Frame->True,FrameTicks->{{{{1,"J=1"},{3,"J=3"}},None},{{{1,"Refinement : 1"}},{{2,"Refinement : 2"}}}}]

OpenersExampleSubsection6(Spacer1)GridLines  (1)

Plot without drawing grid lines separating coefficients:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,GridLines->None]

Draw only horizontal grid lines:

WaveletMatrixPlot[dwd,GridLines->{False,True}]

OpenersExampleSubsection7(Spacer1)GridLinesStyle  (1)

Specify an overall style for grid lines separating wavelet coefficients:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,GridLinesStyle->Dashed]

Specify separate styles for horizontal and vertical grid lines:

WaveletMatrixPlot[dwd,GridLinesStyle->{Dashed,Directive[Opacity[0.3],Blue]}]

OpenersExampleSubsection8(Spacer1)Ticks  (1)

Draw no ticks on axes:

dwd=DiscreteWaveletTransform[DiamondMatrix[32],Automatic,3];

WaveletMatrixPlot[dwd,Ticks->None]

Draw ticks on the vertical axis only:

WaveletMatrixPlot[dwd,Ticks->{False,True}]

Draw tick marks at the specified positions with the specified labels:

WaveletMatrixPlot[dwd,Ticks->{{{1,"Refinement : 1"}},{{1,"J=1"},{3,"J=3"}}}]

OpenersExampleSubsection9(Spacer1)Method  (1)

Inverse transform each coefficient before plotting:

data = GaussianMatrix[ {20,20}];

MatrixPlot[data]

Inverse transform coefficients from stationary wavelet transform:

dwd1=StationaryWaveletTransform[data,Automatic,3];

WaveletMatrixPlot[dwd1,Method->"InverseTransform"]

Inverse transform coefficients from lifting wavelet transform:

dwd2=LiftingWaveletTransform[data,Automatic,3];

WaveletMatrixPlot[dwd2,Method->"InverseTransform"]

OpenersExampleSubsection10(Spacer1)PlotTheme  (2)

Use a monochrome theme:

dwd=DiscreteWaveletTransform[Table[Exp[I x/y],{x,10},{y,10}]];

WaveletMatrixPlot[dwd,PlotTheme->"Monochrome"]

Change the grid lines style:

dwd=DiscreteWaveletTransform[Table[Exp[I x/y],{x,10},{y,10}]]

WaveletMatrixPlot[dwd,PlotTheme->"Monochrome",GridLinesStyle->White]

OpenersExampleSection4(Spacer1)Properties & Relations  (4)

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot]) plots matrix wavelet coefficients in a hierarchical grid layout:

dwd=DiscreteWaveletTransform[RandomReal[1,{8,8}]];

WaveletMatrixPlot[dwd]

dwd[…,"MatrixPlot"] gives each coefficient as a separate matrix plot:

dwd[Automatic,{"MatrixPlot",ImageSize->50}]

(RefLink[WaveletMatrixPlot, paclet:ref/WaveletMatrixPlot]) plots the (RefLink[Automatic, paclet:ref/Automatic]) coefficients used in the inverse transform:

dwd=DiscreteWaveletPacketTransform[Sin[HilbertMatrix[16]]];

WaveletMatrixPlot[dwd]

(RefLink[WaveletBestBasis, paclet:ref/WaveletBestBasis]) selects a different default tree of coefficients:

best=WaveletBestBasis[dwd];

WaveletMatrixPlot[best]

(RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot]) shows image wavelet coefficients in a hierarchical grid:

dwd=DiscreteWaveletTransform[];

WaveletImagePlot[dwd]

(RefLink[WaveletScalogram, paclet:ref/WaveletScalogram]) plots vector coefficients with numerical magnitude indicated by color:

data=Table[2-5 t+5 Exp[-500 (t-0.5)^2],{t,0,1,0.02}];

dwd=DiscreteWaveletTransform[data,Automatic,3];

WaveletScalogram[dwd]

(RefLink[WaveletListPlot, paclet:ref/WaveletListPlot]) plots vector coefficients with a common horizontal or vertical axis:

Table[WaveletListPlot[dwd,PlotLayout->p,PlotLabel->PlotLayout->p],{p,{"CommonXAxis","CommonYAxis"}}]

OpenersExampleSection5(Spacer1)Possible Issues  (2)

Wavelet coefficients from stationary wavelet transform cannot be plotted using pyramid layout:

dwd= StationaryWaveletTransform[RandomReal[1,{10,10}]];

WaveletMatrixPlot[dwd,PlotLayout->"Pyramid"]

Pyramid layout cannot be constructed for inverse transformed wavelet coefficients:

dwd= DiscreteWaveletTransform[RandomReal[1,{10,10}]];

WaveletMatrixPlot[dwd,PlotLayout->"Pyramid",Method->"InverseTransform"]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[MatrixPlot, paclet:ref/MatrixPlot])  ▪  (RefLink[DiscreteWaveletData, paclet:ref/DiscreteWaveletData])  ▪  (RefLink[WaveletImagePlot, paclet:ref/WaveletImagePlot])  ▪  (RefLink[WaveletListPlot, paclet:ref/WaveletListPlot])  ▪  (RefLink[DiscreteWaveletTransform, paclet:ref/DiscreteWaveletTransform])  ▪  (RefLink[LiftingWaveletTransform, paclet:ref/LiftingWaveletTransform])  ▪  (RefLink[DiscreteWaveletPacketTransform, paclet:ref/DiscreteWaveletPacketTransform])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Wavelet Analysis, paclet:guide/Wavelets])}, {▪(RefLinkPlain[Data Visualization, paclet:guide/DataVisualization])}})}})