New in Wolfram
Mathematica
8: Modelado de grafos y de redes
◄
previous
|
next
►
Áreas de aplicación
Visualice árboles de paquetes de óndulas
Construya un grafo para visualizar un árbol de paquete de óndulas.
In[1]:=
X
data = Table[Sin[x^2], {x, -8, 8, 0.2}];
In[2]:=
X
edges = {{} \[DirectedEdge] {0}, {} \[DirectedEdge] {1}, {0} \ \[DirectedEdge] {0, 0}, {0} \[DirectedEdge] {0, 1}, {1} \[DirectedEdge] {1, 0}, {1} \[DirectedEdge] {1, 1}};
In[3]:=
X
swt = StationaryWaveletPacketTransform[data, Automatic, 2];
In[4]:=
X
vShapes = Prepend[swt[ All, {"ListPlot", PlotMarkers -> "", PlotStyle -> Darker@Brown}], {} -> ListPlot[data, Frame -> False, Axes -> False, Joined -> True]];
In[5]:=
X
Framed[Graph[edges, VertexShape -> vShapes, VertexSize -> {"Scaled", .2}, EdgeStyle -> Thick, ImageSize -> 450], RoundingRadius -> 5]
Out[5]=