Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions pygsp/filters/abspline.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class Abspline(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Abspline(G)
>>> g
Abspline(in=1, out=6, lpfactor=20.00)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/expwin.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class Expwin(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Expwin(G, band_min=0.1, band_max=0.7, slope=5)
>>> g
Expwin(in=1, out=1, band_min=0.10, band_max=0.70, slope=5)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ class Filter(object):
--------
>>> G = graphs.Logo()
>>> my_filter = filters.Filter(G, lambda x: x / (1. + x))
>>> my_filter
Filter(in=1, out=1)
>>>
>>> # Signal: Kronecker delta.
>>> signal = np.zeros(G.N)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/gabor.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ class Gabor(Filter):
... _ = g.plot(ax=ax[0], sum=False)
... _ = G.plot(s, ax=ax[1])
>>> fig.tight_layout()
>>> g
Gabor(in=1, out=7)

"""

Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/halfcosine.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class HalfCosine(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.HalfCosine(G)
>>> g
HalfCosine(in=1, out=6)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/heat.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class Heat(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Heat(G, scale=[5, 10, 100])
>>> g
Heat(in=1, out=3, scale=[5.00, 10.00, 100.00], normalize=False)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/held.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class Held(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Held(G)
>>> g
Held(in=1, out=2, a=0.67)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/itersine.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class Itersine(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Itersine(G)
>>> g
Itersine(in=1, out=6, overlap=2.00)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/mexicanhat.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class MexicanHat(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.MexicanHat(G)
>>> g
MexicanHat(in=1, out=6, lpfactor=20.00, normalize=False)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/meyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Meyer(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Meyer(G)
>>> g
Meyer(in=1, out=6)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/modulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ class Modulation(Filter):
>>> g1 = filters.Modulation(G, g, modulation_first=False)
>>> g2 = filters.Modulation(G, g, modulation_first=True)
>>> _ = g1.plot(sum=False)
>>> g1
Modulation(in=1, out=90)
>>>
>>> # Signal.
>>> s = np.empty(G.N)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/papadakis.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class Papadakis(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Papadakis(G)
>>> g
Papadakis(in=1, out=2, a=0.75)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/rectangular.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ class Rectangular(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Rectangular(G, band_min=0.1, band_max=0.5)
>>> g
Rectangular(in=1, out=1, band_min=0.10, band_max=0.50)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/regular.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ class Regular(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Regular(G)
>>> g
Regular(in=1, out=2)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/simoncelli.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class Simoncelli(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Simoncelli(G)
>>> g
Simoncelli(in=1, out=2, a=0.67)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/simpletight.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class SimpleTight(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.SimpleTight(G)
>>> g
SimpleTight(in=1, out=6)
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/filters/wave.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class Wave(Filter):
>>> G.estimate_lmax()
>>> G.set_coordinates('line1D')
>>> g = filters.Wave(G, time=[5, 15], speed=1)
>>> g
Wave(in=1, out=2, time=[5.00, 15.00], speed=[1.00])
>>> s = g.localize(G.N // 2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = g.plot(ax=axes[0])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/airfoil.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class Airfoil(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Airfoil()
>>> G
Airfoil(n_vertices=4253, n_edges=12289)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=0.5)
>>> _ = G.plot(edges=True, ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/barabasialbert.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class BarabasiAlbert(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.BarabasiAlbert(N=150, seed=42)
>>> G
BarabasiAlbert(n_vertices=150, n_edges=149, m0=1, m=1, seed=42)
>>> G.set_coordinates(kind='spring', seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=2)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/comet.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Comet(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Comet(15, 10)
>>> G
Comet(n_vertices=15, n_edges=14, k=10)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/community.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ class Community(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Community(N=250, Nc=3, comm_sizes=[50, 120, 80], seed=42)
>>> G # doctest: +ELLIPSIS
Community(n_vertices=250, n_edges=1607, Nc=3, min_comm=28, ..., seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=0.5)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/davidsensornet.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class DavidSensorNet(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.DavidSensorNet()
>>> G
DavidSensorNet(n_vertices=64, n_edges=236, seed=None)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=2)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/erdosrenyi.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class ErdosRenyi(StochasticBlockModel):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.ErdosRenyi(N=64, seed=42)
>>> G # doctest: +ELLIPSIS
ErdosRenyi(n_vertices=64, n_edges=219, k=1, p=0.10, q=0.30, ..., seed=42)
>>> G.set_coordinates(kind='spring', seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=2)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/fullconnected.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class FullConnected(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.FullConnected(N=20)
>>> G
FullConnected(n_vertices=20, n_edges=190)
>>> G.set_coordinates(kind='spring', seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=5)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/grid2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ class Grid2d(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Grid2d(N1=5, N2=4)
>>> G
Grid2d(n_vertices=20, n_edges=31, N1=5, N2=4)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W)
>>> _ = G.plot(ax=axes[1])
Expand Down
4 changes: 4 additions & 0 deletions pygsp/graphs/linegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ class LineGraph(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> graph = graphs.Sensor(5, k=2, seed=10)
>>> graph
Sensor(n_vertices=5, n_edges=6, k=2, distributed=False, seed=10)
>>> line_graph = graphs.LineGraph(graph)
>>> line_graph
LineGraph(n_vertices=6, n_edges=10)
>>> fig, ax = plt.subplots()
>>> fig, ax = graph.plot('blue', edge_color='blue', indices=True, ax=ax)
>>> fig, ax = line_graph.plot('red', edge_color='red', indices=True, ax=ax)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ class Logo(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Logo()
>>> G
Logo(n_vertices=1130, n_edges=3131)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=0.5)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/lowstretchtree.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class LowStretchTree(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.LowStretchTree(k=2)
>>> G
LowStretchTree(n_vertices=16, n_edges=30, k=2)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/minnesota.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ class Minnesota(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Minnesota()
>>> G
Minnesota(n_vertices=2642, n_edges=3304, connected=True)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=0.5)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/nngraphs/bunny.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ class Bunny(NNGraph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Bunny()
>>> G # doctest: +ELLIPSIS
Bunny(n_vertices=2503, n_edges=78292, NNtype=radius, ..., order=0)
>>> fig = plt.figure()
>>> ax1 = fig.add_subplot(121)
>>> ax2 = fig.add_subplot(122, projection='3d')
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/nngraphs/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Cube(NNGraph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Cube(seed=42)
>>> G # doctest: +ELLIPSIS
Cube(n_vertices=300, n_edges=1722, radius=1.00, nb_pts=300, ..., order=0)
>>> fig = plt.figure()
>>> ax1 = fig.add_subplot(121)
>>> ax2 = fig.add_subplot(122, projection='3d')
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/nngraphs/grid2dimgpatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ class Grid2dImgPatches(Graph):
>>> from skimage import data, img_as_float
>>> img = img_as_float(data.camera()[::64, ::64])
>>> G = graphs.Grid2dImgPatches(img)
>>> G # doctest: +ELLIPSIS
Grid2dImgPatches(n_vertices=64, n_edges=522, N1=8, N2=8, ..., order=0)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=2)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/nngraphs/imgpatches.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class ImgPatches(NNGraph):
>>> from skimage import data, img_as_float
>>> img = img_as_float(data.camera()[::64, ::64])
>>> G = graphs.ImgPatches(img, patch_shape=(3, 3))
>>> G # doctest: +ELLIPSIS
ImgPatches(n_vertices=64, n_edges=473, patch_shape=(3, 3), ..., order=0)
>>> print('{} nodes ({} x {} pixels)'.format(G.Xin.shape[0], *img.shape))
64 nodes (8 x 8 pixels)
>>> print('{} features per node'.format(G.Xin.shape[1]))
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/nngraphs/nngraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ class NNGraph(Graph):
>>> import matplotlib.pyplot as plt
>>> X = np.random.RandomState(42).uniform(size=(30, 2))
>>> G = graphs.NNGraph(X)
>>> G # doctest: +ELLIPSIS
NNGraph(n_vertices=30, n_edges=187, NNtype=knn, ..., order=0)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=5)
>>> _ = G.plot(ax=axes[1])
Expand Down
4 changes: 4 additions & 0 deletions pygsp/graphs/nngraphs/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,16 @@ class Sensor(NNGraph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Sensor(N=64, seed=42)
>>> G
Sensor(n_vertices=64, n_edges=229, k=6, distributed=False, seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=2)
>>> _ = G.plot(ax=axes[1])

>>> import matplotlib.pyplot as plt
>>> G = graphs.Sensor(N=64, distributed=True, seed=42)
>>> G
Sensor(n_vertices=64, n_edges=228, k=6, distributed=True, seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=2)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/nngraphs/sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class Sphere(NNGraph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Sphere(nb_pts=100, seed=42)
>>> G # doctest: +ELLIPSIS
Sphere(n_vertices=100, n_edges=581, radius=1.00, nb_pts=100, ..., order=0)
>>> fig = plt.figure()
>>> ax1 = fig.add_subplot(121)
>>> ax2 = fig.add_subplot(122, projection='3d')
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/nngraphs/twomoons.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ class TwoMoons(NNGraph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.TwoMoons()
>>> G # doctest: +ELLIPSIS
TwoMoons(n_vertices=2000, n_edges=6132, moontype=standard, ..., order=0)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=0.5)
>>> _ = G.plot(edges=True, ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class Path(Graph):
... G = graphs.Path(N=10, directed=directed)
... _ = axes[i, 0].spy(G.W)
... _ = G.plot(ax=axes[i, 1])
>>> G
Path(n_vertices=10, n_edges=9, directed=True)

The GFT of the path graph is the classical DCT.

Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/randomregular.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class RandomRegular(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.RandomRegular(N=64, k=5, seed=42)
>>> G
RandomRegular(n_vertices=64, n_edges=160, k=5, seed=42)
>>> G.set_coordinates(kind='spring', seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=2)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/randomring.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ class RandomRing(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.RandomRing(N=10, seed=42)
>>> G
RandomRing(n_vertices=10, n_edges=10, seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/ring.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ class Ring(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.Ring(N=10)
>>> G
Ring(n_vertices=10, n_edges=10, k=1)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W)
>>> _ = G.plot(ax=axes[1])
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/stochasticblockmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ class StochasticBlockModel(Graph):
>>> import matplotlib.pyplot as plt
>>> G = graphs.StochasticBlockModel(
... 100, k=3, p=[0.4, 0.6, 0.3], q=0.02, seed=42)
>>> G # doctest: +ELLIPSIS
StochasticBlockModel(n_vertices=100, n_edges=795, k=3, ..., seed=42)
>>> G.set_coordinates(kind='spring', seed=42)
>>> fig, axes = plt.subplots(1, 2)
>>> _ = axes[0].spy(G.W, markersize=0.8)
Expand Down
2 changes: 2 additions & 0 deletions pygsp/graphs/swissroll.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ class SwissRoll(Graph):
--------
>>> import matplotlib.pyplot as plt
>>> G = graphs.SwissRoll(N=200, seed=42)
>>> G # doctest: +ELLIPSIS
SwissRoll(n_vertices=200, n_edges=1244, a=1, b=4, dim=3, ..., seed=42)
>>> fig = plt.figure()
>>> ax1 = fig.add_subplot(121)
>>> ax2 = fig.add_subplot(122, projection='3d')
Expand Down
Loading