# WaveletScalogram in polar coordinates

For given dataset

data = Re[Zeta[1/2 + I Range[0, 100, 0.01]]];


It is nice that Mathematica can plot data in both Cartesian and Polar coordinates.

SetOptions[ListPolarPlot, Joined -> True];
#[data] & /@ {ListLinePlot, ListPolarPlot} WaveletScalogram is an insightful glance in temporal data:

cwd = ContinuousWaveletTransform[data, GaborWavelet, {4, 12}, WaveletScale -> 100];
ws = WaveletScalogram[cwd, All, Re, ColorFunction -> "CherryTones"] Is it possible to somehow visualize it in Polar coordinates?

I would try to extract the data from underlying Graphics, but it is a raster

ws[] // Head
ws[[1, 1]] // Dimensions

Raster
{48, 5001}


The only thing that comes to mind is ImageTransformation but I don’t think it is an efficient way (will be hard to scale the axis, etc.). Any advice is appreciated.

• In Mathematica wavelets data is stored at ContinuousWaveletData or DiscreteWaveletData. You can check the doc. You can try InverseContinuousWaveletTransform[cwd] // ListPolarPlot to polar plot the resulted wavelet. the Properties of the data are "DataChannels", "DataDimensions", "DataMean", "DataWrapper", "LinearScalogramFunction", "ListPlot", "LogScalogramFunction", "Octaves", "Properties", "SampleRate", "Scales", "Voices", "Wavelet", "WaveletIndex", "WaveletScale". If you see the properties there is no polar plot by default. – s.s.o Sep 9 '13 at 7:16

I found a way to do this thanks to the more simple question I posted here:

Wrapping ArrayPlot or MatrixPlot around a circle

but it takes a very long time to compute. So I will post the answer but I hope someone will post a faster solution.

cwd = ContinuousWaveletTransform[data, GaborWavelet, {4, 12}, WaveletScale -> 100];
ws = WaveletScalogram[cwd, All, Re, ColorFunction -> "CherryTones"];

SectorChart[
Map[Style[{1, 100}, ColorData["SunsetColors"][#]] &,
ws[[1, 1]][[All, 1 ;; -1 ;; 10]], {2}], PerformanceGoal -> "Speed",
ChartStyle -> EdgeForm[None], Background -> Black] So this is beautiful and it looks exactly as I need. But it took so very long and I would really appreciate and wait if someone posts a faster solution.

• Looks like your polar axis goes to the left. You should flip the image horizontally. – panda-34 Sep 24 '13 at 7:32

We can visualize the wavelet scalogram using ListPolarPlot

data = Re[Zeta[1/2 + I Range[0, 100, 0.01]]];
cwd = ContinuousWaveletTransform[data, GaborWavelet, {4, 12}, WaveletScale -> 100];

ListPolarPlot[Abs@Reverse[Last /@ cwd[All]], ColorFunction -> "Rainbow"] Additionally we can see the scalogram in 3D using ListPlot3D:

 ListPlot3D[Abs@Reverse[Last /@ cwd[All]], PlotRange -> All,
Mesh -> None, ColorFunction -> "AtlanticColors",
Ticks -> {Automatic, None, Automatic},
AxesLabel -> {"time", "octaves", "magnitude"}, Boxed -> False] Note: The usage of AxesLabel in the second plot is just an example.

• @Darya Is this the solution ? – Sektor Sep 10 '13 at 8:07
• Thanks, Nicola, this is interesting, but I hoped to see something reminiscent of original WaveletScalogram visual in polar coordinates. – Darya Aleinikava Sep 23 '13 at 5:16

So, the scalogram is a raster, so what? Why does it deter you from just wrapping it around the pole?

ws = WaveletScalogram[cwd, All, Re, ColorFunction -> "CherryTones",
Axes -> False, PlotRangePadding -> None, AspectRatio -> 1]

ImageTransformation[ws, {(ArcTan @@ (0.5 - #) + Pi)/(2 Pi),2 Norm[0.5 - #]} &] • I think this ought to be the accepted answer. – DumpsterDoofus Jan 30 '14 at 2:21