You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/examples_sphinx-gallery/articulation_points.py
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
This example shows how to compute and visualize the `articulation points <https://en.wikipedia.org/wiki/Biconnected_component>`_ in a graph using :meth:`igraph.GraphBase.articulation_points`. For an example on bridges instead, see :ref:`tutorials-bridges`.
Copy file name to clipboardExpand all lines: doc/examples_sphinx-gallery/bipartite_matching_maxflow.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,6 +9,7 @@
9
9
10
10
.. note:: :meth:`igraph.Graph.maximum_bipartite_matching` is usually a better way to find the maximum bipartite matching. For a demonstration on how to use that method instead, check out :ref:`tutorials-bipartite-matching`.
Copy file name to clipboardExpand all lines: doc/examples_sphinx-gallery/bridges.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
8
8
This example shows how to compute and visualize the `bridges <https://en.wikipedia.org/wiki/Bridge_(graph_theory)>`_ in a graph using :meth:`igraph.GraphBase.bridges`. For an example on articulation points instead, see :ref:`tutorials-articulation-points`.
9
9
"""
10
+
10
11
importigraphasig
11
12
importmatplotlib.pyplotasplt
12
13
@@ -37,7 +38,7 @@
37
38
target=ax,
38
39
vertex_size=30,
39
40
vertex_color="lightblue",
40
-
vertex_label=range(g.vcount())
41
+
vertex_label=range(g.vcount()),
41
42
)
42
43
plt.show()
43
44
@@ -72,9 +73,9 @@
72
73
vertex_size=30,
73
74
vertex_color="lightblue",
74
75
vertex_label=range(g.vcount()),
75
-
edge_background="#FFF0", # transparent background color
76
-
edge_align_label=True, # make sure labels are aligned with the edge
76
+
edge_background="#FFF0", # transparent background color
77
+
edge_align_label=True, # make sure labels are aligned with the edge
Copy file name to clipboardExpand all lines: doc/examples_sphinx-gallery/cluster_contraction.py
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
8
8
This example shows how to find the communities in a graph, then contract each community into a single node using :class:`igraph.clustering.VertexClustering`. For this tutorial, we'll use the *Donald Knuth's Les Miserables Network*, which shows the coapperances of characters in the novel *Les Miserables*.
9
9
"""
10
+
10
11
importigraphasig
11
12
importmatplotlib.pyplotasplt
12
13
@@ -106,7 +107,10 @@
106
107
# Finally, we can assign colors to the clusters and plot the cluster graph,
Copy file name to clipboardExpand all lines: doc/examples_sphinx-gallery/complement.py
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
8
8
This example shows how to generate the `complement graph <https://en.wikipedia.org/wiki/Complement_graph>`_ of a graph (sometimes known as the anti-graph) using :meth:`igraph.GraphBase.complementer`.
Copy file name to clipboardExpand all lines: doc/examples_sphinx-gallery/configuration.py
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@
7
7
8
8
This example shows how to use igraph's :class:`configuration instance <igraph.Configuration>` to set default igraph settings. This is useful for setting global settings so that they don't need to be explicitly stated at the beginning of every igraph project you work on.
Copy file name to clipboardExpand all lines: doc/examples_sphinx-gallery/delaunay-triangulation.py
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
This example demonstrates how to calculate the `Delaunay triangulation <https://en.wikipedia.org/wiki/Delaunay_triangulation>`_ of an input graph. We start by generating a set of points on a 2D grid using random ``numpy`` arrays and a graph with those vertex coordinates and no edges.
9
9
10
10
"""
11
+
11
12
importnumpyasnp
12
13
fromscipy.spatialimportDelaunay
13
14
importigraphasig
@@ -20,8 +21,8 @@
20
21
np.random.seed(0)
21
22
x, y=np.random.rand(2, 30)
22
23
g=ig.Graph(30)
23
-
g.vs['x'] =x
24
-
g.vs['y'] =y
24
+
g.vs["x"] =x
25
+
g.vs["y"] =y
25
26
26
27
# %%
27
28
# Because we already set the `x` and `y` vertex attributes, we can use
0 commit comments