Offset 1, 4 lines modified | Offset 1, 4 lines modified | ||
1 | · | 1 | ·aaf82af6558c17b88249c483d581d3fa·6224136·doc·optional·python-igraph-doc_0.11.9+ds-1_all.deb |
2 | ·d468929df4b16d410bdb5c8a47bf6934·389360·debug·optional·python3-igraph-dbgsym_0.11.9+ds-1_arm64.deb | 2 | ·d468929df4b16d410bdb5c8a47bf6934·389360·debug·optional·python3-igraph-dbgsym_0.11.9+ds-1_arm64.deb |
3 | ·68e673d527f12afda1beb42d06ebbf04·320740·python·optional·python3-igraph_0.11.9+ds-1_arm64.deb | 3 | ·68e673d527f12afda1beb42d06ebbf04·320740·python·optional·python3-igraph_0.11.9+ds-1_arm64.deb |
Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
1 | -rw-r--r--···0········0········0········4·2025-06-15·18:33:32.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-06-15·18:33:32.000000·debian-binary |
2 | -rw-r--r--···0········0········0····1394 | 2 | -rw-r--r--···0········0········0····13948·2025-06-15·18:33:32.000000·control.tar.xz |
3 | -rw-r--r--···0········0········0··62 | 3 | -rw-r--r--···0········0········0··6209996·2025-06-15·18:33:32.000000·data.tar.xz |
Offset 553, 15 lines modified | Offset 553, 15 lines modified | ||
553 | -rw-r--r--···0·root·········(0)·root·········(0)····21830·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/simplify.html | 553 | -rw-r--r--···0·root·········(0)·root·········(0)····21830·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/simplify.html |
554 | -rw-r--r--···0·root·········(0)·root·········(0)····24428·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/spanning_trees.html | 554 | -rw-r--r--···0·root·········(0)·root·········(0)····24428·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/spanning_trees.html |
555 | -rw-r--r--···0·root·········(0)·root·········(0)····24116·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/topological_sort.html | 555 | -rw-r--r--···0·root·········(0)·root·········(0)····24116·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/topological_sort.html |
556 | -rw-r--r--···0·root·········(0)·root·········(0)····27382·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visual_style.html | 556 | -rw-r--r--···0·root·········(0)·root·········(0)····27382·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visual_style.html |
557 | -rw-r--r--···0·root·········(0)·root·········(0)····23976·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_cliques.html | 557 | -rw-r--r--···0·root·········(0)·root·········(0)····23976·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_cliques.html |
558 | -rw-r--r--···0·root·········(0)·root·········(0)····24099·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_communities.html | 558 | -rw-r--r--···0·root·········(0)·root·········(0)····24099·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_communities.html |
559 | -rw-r--r--···0·root·········(0)·root·········(0)····33576·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/visualisation.html | 559 | -rw-r--r--···0·root·········(0)·root·········(0)····33576·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/visualisation.html |
560 | -rw-r--r--···0·root·········(0)·root·········(0)··19563 | 560 | -rw-r--r--···0·root·········(0)·root·········(0)··1956347·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/igraph.pdf.gz |
561 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/doc-base/ | 561 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/doc-base/ |
562 | -rw-r--r--···0·root·········(0)·root·········(0)······362·2024-05-10·15:38:04.000000·./usr/share/doc-base/python-igraph-doc.igraph | 562 | -rw-r--r--···0·root·········(0)·root·········(0)······362·2024-05-10·15:38:04.000000·./usr/share/doc-base/python-igraph-doc.igraph |
563 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/lintian/ | 563 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/lintian/ |
564 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/lintian/overrides/ | 564 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/lintian/overrides/ |
565 | -rw-r--r--···0·root·········(0)·root·········(0)······154·2024-05-10·15:38:04.000000·./usr/share/lintian/overrides/python-igraph-doc | 565 | -rw-r--r--···0·root·········(0)·root·········(0)······154·2024-05-10·15:38:04.000000·./usr/share/lintian/overrides/python-igraph-doc |
566 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/_static/css/badge_only.css·->·../../../../../sphinx_rtd_theme/static/css/badge_only.css | 566 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/_static/css/badge_only.css·->·../../../../../sphinx_rtd_theme/static/css/badge_only.css |
567 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/_static/css/theme.css·->·../../../../../sphinx_rtd_theme/static/css/theme.css | 567 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-06-15·18:33:32.000000·./usr/share/doc/python-igraph-doc/html/_static/css/theme.css·->·../../../../../sphinx_rtd_theme/static/css/theme.css |
Offset 108, 15 lines modified | Offset 108, 15 lines modified | ||
108 | ..·rst-class::·sphx-glr-timing | 108 | ..·rst-class::·sphx-glr-timing |
109 | ···**Total·running·time·of·the·script:**·(0·minutes·0.1 | 109 | ···**Total·running·time·of·the·script:**·(0·minutes·0.145·seconds) |
110 | ..·_sphx_glr_download_tutorials_articulation_points.py: | 110 | ..·_sphx_glr_download_tutorials_articulation_points.py: |
111 | ..·only::·html | 111 | ..·only::·html |
112 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 112 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 193, 15 lines modified | Offset 193, 15 lines modified | ||
193 | ..·rst-class::·sphx-glr-timing | 193 | ..·rst-class::·sphx-glr-timing |
194 | ···**Total·running·time·of·the·script:**·(0·minutes· | 194 | ···**Total·running·time·of·the·script:**·(0·minutes·2.067·seconds) |
195 | ..·_sphx_glr_download_tutorials_betweenness.py: | 195 | ..·_sphx_glr_download_tutorials_betweenness.py: |
196 | ..·only::·html | 196 | ..·only::·html |
197 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 197 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 161, 15 lines modified | Offset 161, 15 lines modified | ||
161 | ..·rst-class::·sphx-glr-script-out | 161 | ..·rst-class::·sphx-glr-script-out |
162 | ·..·code-block::·none | 162 | ·..·code-block::·none |
163 | ····<igraph.drawing.matplotlib.graph.GraphArtist·object·at·0xffff | 163 | ····<igraph.drawing.matplotlib.graph.GraphArtist·object·at·0xffff8a633250> |
164 | ..·rst-class::·sphx-glr-timing | 164 | ..·rst-class::·sphx-glr-timing |
165 | ···**Total·running·time·of·the·script:**·(0·minutes·0.134·seconds) | 165 | ···**Total·running·time·of·the·script:**·(0·minutes·0.134·seconds) |
Offset 176, 15 lines modified | Offset 176, 15 lines modified | ||
176 | ..·rst-class::·sphx-glr-timing | 176 | ..·rst-class::·sphx-glr-timing |
177 | ···**Total·running·time·of·the·script:**·(0·minutes·0.1 | 177 | ···**Total·running·time·of·the·script:**·(0·minutes·0.165·seconds) |
178 | ..·_sphx_glr_download_tutorials_bipartite_matching_maxflow.py: | 178 | ..·_sphx_glr_download_tutorials_bipartite_matching_maxflow.py: |
179 | ..·only::·html | 179 | ..·only::·html |
180 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 180 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 209, 15 lines modified | Offset 209, 15 lines modified | ||
209 | ..·rst-class::·sphx-glr-timing | 209 | ..·rst-class::·sphx-glr-timing |
210 | ···**Total·running·time·of·the·script:**·(0·minutes·0.4 | 210 | ···**Total·running·time·of·the·script:**·(0·minutes·0.407·seconds) |
211 | ..·_sphx_glr_download_tutorials_bridges.py: | 211 | ..·_sphx_glr_download_tutorials_bridges.py: |
212 | ..·only::·html | 212 | ..·only::·html |
213 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 213 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 401, 15 lines modified | Offset 401, 15 lines modified | ||
401 | ..·rst-class::·sphx-glr-timing | 401 | ..·rst-class::·sphx-glr-timing |
402 | ···**Total·running·time·of·the·script:**·(0·minutes· | 402 | ···**Total·running·time·of·the·script:**·(0·minutes·1.519·seconds) |
403 | ..·_sphx_glr_download_tutorials_cluster_contraction.py: | 403 | ..·_sphx_glr_download_tutorials_cluster_contraction.py: |
404 | ..·only::·html | 404 | ..·only::·html |
405 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 405 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 173, 15 lines modified | Offset 173, 15 lines modified | ||
173 | ..·rst-class::·sphx-glr-timing | 173 | ..·rst-class::·sphx-glr-timing |
174 | ···**Total·running·time·of·the·script:**·(0·minutes·0.52 | 174 | ···**Total·running·time·of·the·script:**·(0·minutes·0.522·seconds) |
175 | ..·_sphx_glr_download_tutorials_complement.py: | 175 | ..·_sphx_glr_download_tutorials_complement.py: |
176 | ..·only::·html | 176 | ..·only::·html |
177 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 177 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 159, 15 lines modified | Offset 159, 15 lines modified | ||
159 | ····To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, | 159 | ····To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, |
160 | ····colors,·layout·etc.)·check·out·:ref:`tutorials-visual-style`. | 160 | ····colors,·layout·etc.)·check·out·:ref:`tutorials-visual-style`. |
161 | ..·rst-class::·sphx-glr-timing | 161 | ..·rst-class::·sphx-glr-timing |
162 | ···**Total·running·time·of·the·script:**·(0·minutes·1.1 | 162 | ···**Total·running·time·of·the·script:**·(0·minutes·1.137·seconds) |
163 | ..·_sphx_glr_download_tutorials_configuration.py: | 163 | ..·_sphx_glr_download_tutorials_configuration.py: |
164 | ..·only::·html | 164 | ..·only::·html |
165 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 165 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 117, 15 lines modified | Offset 117, 15 lines modified | ||
117 | ····We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex | 117 | ····We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex |
118 | ····colors,·since·255·in·the·:class:`igraph.drawing.colors.RainbowPalette` | 118 | ····colors,·since·255·in·the·:class:`igraph.drawing.colors.RainbowPalette` |
119 | ····corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues. | 119 | ····corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues. |
120 | ..·rst-class::·sphx-glr-timing | 120 | ..·rst-class::·sphx-glr-timing |
121 | ···**Total·running·time·of·the·script:**·(0·minutes·0.57 | 121 | ···**Total·running·time·of·the·script:**·(0·minutes·0.577·seconds) |
122 | ..·_sphx_glr_download_tutorials_connected_components.py: | 122 | ..·_sphx_glr_download_tutorials_connected_components.py: |
123 | ..·only::·html | 123 | ..·only::·html |
124 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 124 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 140, 15 lines modified | Offset 140, 15 lines modified | ||
140 | ..·rst-class::·sphx-glr-script-out | 140 | ..·rst-class::·sphx-glr-script-out |
141 | ·..·code-block::·none | 141 | ·..·code-block::·none |
142 | ····<igraph.Graph·object·at·0xffff9 | 142 | ····<igraph.Graph·object·at·0xffff9c11a050> |
143 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·52-54 | 143 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·52-54 |
144 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks | 144 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks |
145 | like: | 145 | like: |
Offset 244, 15 lines modified | Offset 244, 15 lines modified | ||
244 | ..·rst-class::·sphx-glr-timing | 244 | ..·rst-class::·sphx-glr-timing |
245 | ···**Total·running·time·of·the·script:**·(0·minutes· | 245 | ···**Total·running·time·of·the·script:**·(0·minutes·0.670·seconds) |
246 | ..·_sphx_glr_download_tutorials_delaunay-triangulation.py: | 246 | ..·_sphx_glr_download_tutorials_delaunay-triangulation.py: |
247 | ..·only::·html | 247 | ..·only::·html |
248 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 248 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 186, 15 lines modified | Offset 186, 15 lines modified | ||
186 | ..·rst-class::·sphx-glr-timing | 186 | ..·rst-class::·sphx-glr-timing |
187 | ···**Total·running·time·of·the·script:**·(0·minutes·0.8 | 187 | ···**Total·running·time·of·the·script:**·(0·minutes·0.891·seconds) |
188 | ..·_sphx_glr_download_tutorials_erdos_renyi.py: | 188 | ..·_sphx_glr_download_tutorials_erdos_renyi.py: |
189 | ..·only::·html | 189 | ..·only::·html |
190 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 190 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 147, 15 lines modified | Offset 147, 15 lines modified | ||
147 | ..·rst-class::·sphx-glr-timing | 147 | ..·rst-class::·sphx-glr-timing |
148 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 148 | ···**Total·running·time·of·the·script:**·(0·minutes·0.504·seconds) |
149 | ..·_sphx_glr_download_tutorials_generate_dag.py: | 149 | ..·_sphx_glr_download_tutorials_generate_dag.py: |
150 | ..·only::·html | 150 | ..·only::·html |
151 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 151 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 154, 15 lines modified | Offset 154, 15 lines modified | ||
154 | ..·rst-class::·sphx-glr-timing | 154 | ..·rst-class::·sphx-glr-timing |
155 | ···**Total·running·time·of·the·script:**·(0·minutes·0.2 | 155 | ···**Total·running·time·of·the·script:**·(0·minutes·0.280·seconds) |
156 | ..·_sphx_glr_download_tutorials_isomorphism.py: | 156 | ..·_sphx_glr_download_tutorials_isomorphism.py: |
157 | ..·only::·html | 157 | ..·only::·html |
158 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 158 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 121, 15 lines modified | Offset 121, 15 lines modified | ||
121 | ..·rst-class::·sphx-glr-timing | 121 | ..·rst-class::·sphx-glr-timing |
122 | ···**Total·running·time·of·the·script:**·(0·minutes·0.1 | 122 | ···**Total·running·time·of·the·script:**·(0·minutes·0.129·seconds) |
123 | ..·_sphx_glr_download_tutorials_maxflow.py: | 123 | ..·_sphx_glr_download_tutorials_maxflow.py: |
124 | ..·only::·html | 124 | ..·only::·html |
125 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 125 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 141, 15 lines modified | Offset 141, 15 lines modified | ||
141 | ..·rst-class::·sphx-glr-timing | 141 | ..·rst-class::·sphx-glr-timing |
142 | ···**Total·running·time·of·the·script:**·(0·minutes·0.35 | 142 | ···**Total·running·time·of·the·script:**·(0·minutes·0.350·seconds) |
143 | ..·_sphx_glr_download_tutorials_minimum_spanning_trees.py: | 143 | ..·_sphx_glr_download_tutorials_minimum_spanning_trees.py: |
144 | ..·only::·html | 144 | ..·only::·html |
145 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 145 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 245, 15 lines modified | Offset 245, 15 lines modified | ||
245 | ..·rst-class::·sphx-glr-timing | 245 | ..·rst-class::·sphx-glr-timing |
246 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 246 | ···**Total·running·time·of·the·script:**·(0·minutes·0.548·seconds) |
247 | ..·_sphx_glr_download_tutorials_online_user_actions.py: | 247 | ..·_sphx_glr_download_tutorials_online_user_actions.py: |
248 | ..·only::·html | 248 | ..·only::·html |
249 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 249 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 238, 15 lines modified | Offset 238, 15 lines modified | ||
238 | ..·rst-class::·sphx-glr-timing | 238 | ..·rst-class::·sphx-glr-timing |
239 | ···**Total·running·time·of·the·script:**·(0·minutes·0.7 | 239 | ···**Total·running·time·of·the·script:**·(0·minutes·0.715·seconds) |
240 | ..·_sphx_glr_download_tutorials_personalized_pagerank.py: | 240 | ..·_sphx_glr_download_tutorials_personalized_pagerank.py: |
241 | ..·only::·html | 241 | ..·only::·html |
242 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 242 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 104, 15 lines modified | Offset 104, 15 lines modified | ||
104 | ····#·Export·and·import·a·graph·as·a·GML·file. | 104 | ····#·Export·and·import·a·graph·as·a·GML·file. |
105 | ····g.save("social_network.gml") | 105 | ····g.save("social_network.gml") |
106 | ····g·=·ig.load("social_network.gml") | 106 | ····g·=·ig.load("social_network.gml") |
107 | ..·rst-class::·sphx-glr-timing | 107 | ..·rst-class::·sphx-glr-timing |
108 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 108 | ···**Total·running·time·of·the·script:**·(0·minutes·0.286·seconds) |
109 | ..·_sphx_glr_download_tutorials_quickstart.py: | 109 | ..·_sphx_glr_download_tutorials_quickstart.py: |
110 | ..·only::·html | 110 | ..·only::·html |
111 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 111 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 339, 62 lines modified | Offset 339, 62 lines modified | ||
339 | ·····.anim-state·input·{ | 339 | ·····.anim-state·input·{ |
340 | ·········margin:·0; | 340 | ·········margin:·0; |
341 | ·········vertical-align:·middle; | 341 | ·········vertical-align:·middle; |
342 | ·····} | 342 | ·····} |
343 | ·····</style> | 343 | ·····</style> |
344 | ·····<div·class="animation"> | 344 | ·····<div·class="animation"> |
345 | ·······<img·id="_anim_img | 345 | ·······<img·id="_anim_imgfacc3faa0a6c42b992b25436ab4155f0"> |
346 | ·······<div·class="anim-controls"> | 346 | ·······<div·class="anim-controls"> |
347 | ·········<input·id="_anim_slider | 347 | ·········<input·id="_anim_sliderfacc3faa0a6c42b992b25436ab4155f0"·type="range"·class="anim-slider" |
348 | ················name="points"·min="0"·max="1"·step="1"·value="0" | 348 | ················name="points"·min="0"·max="1"·step="1"·value="0" |
349 | ················oninput="anim | 349 | ················oninput="animfacc3faa0a6c42b992b25436ab4155f0.set_frame(parseInt(this.value));"> |
350 | ·········<div·class="anim-buttons"> | 350 | ·········<div·class="anim-buttons"> |
351 | ···········<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="anim | 351 | ···········<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.slower()"> |
352 | ···············<i·class="fa·fa-minus"></i></button> | 352 | ···············<i·class="fa·fa-minus"></i></button> |
353 | ···········<button·title="First·frame"·aria-label="First·frame"·onclick="anim | 353 | ···········<button·title="First·frame"·aria-label="First·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.first_frame()"> |
354 | ·············<i·class="fa·fa-fast-backward"></i></button> | 354 | ·············<i·class="fa·fa-fast-backward"></i></button> |
355 | ···········<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="anim | 355 | ···········<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.previous_frame()"> |
356 | ···············<i·class="fa·fa-step-backward"></i></button> | 356 | ···············<i·class="fa·fa-step-backward"></i></button> |
357 | ···········<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="anim | 357 | ···········<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.reverse_animation()"> |
358 | ···············<i·class="fa·fa-play·fa-flip-horizontal"></i></button> | 358 | ···············<i·class="fa·fa-play·fa-flip-horizontal"></i></button> |
359 | ···········<button·title="Pause"·aria-label="Pause"·onclick="anim | 359 | ···········<button·title="Pause"·aria-label="Pause"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.pause_animation()"> |
360 | ···············<i·class="fa·fa-pause"></i></button> | 360 | ···············<i·class="fa·fa-pause"></i></button> |
361 | ···········<button·title="Play"·aria-label="Play"·onclick="anim | 361 | ···········<button·title="Play"·aria-label="Play"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.play_animation()"> |
362 | ···············<i·class="fa·fa-play"></i></button> | 362 | ···············<i·class="fa·fa-play"></i></button> |
363 | ···········<button·title="Next·frame"·aria-label="Next·frame"·onclick="anim | 363 | ···········<button·title="Next·frame"·aria-label="Next·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.next_frame()"> |
364 | ···············<i·class="fa·fa-step-forward"></i></button> | 364 | ···············<i·class="fa·fa-step-forward"></i></button> |
365 | ···········<button·title="Last·frame"·aria-label="Last·frame"·onclick="anim | 365 | ···········<button·title="Last·frame"·aria-label="Last·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.last_frame()"> |
366 | ···············<i·class="fa·fa-fast-forward"></i></button> | 366 | ···············<i·class="fa·fa-fast-forward"></i></button> |
367 | ···········<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="anim | 367 | ···········<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.faster()"> |
368 | ···············<i·class="fa·fa-plus"></i></button> | 368 | ···············<i·class="fa·fa-plus"></i></button> |
369 | ·········</div> | 369 | ·········</div> |
370 | ·········<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_select | 370 | ·········<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_selectfacc3faa0a6c42b992b25436ab4155f0" |
371 | ···············class="anim-state"> | 371 | ···············class="anim-state"> |
372 | ···········<input·type="radio"·name="state"·value="once"·id="_anim_radio1_ | 372 | ···········<input·type="radio"·name="state"·value="once"·id="_anim_radio1_facc3faa0a6c42b992b25436ab4155f0" |
373 | ··················> | 373 | ··················> |
374 | ···········<label·for="_anim_radio1_ | 374 | ···········<label·for="_anim_radio1_facc3faa0a6c42b992b25436ab4155f0">Once</label> |
375 | ···········<input·type="radio"·name="state"·value="loop"·id="_anim_radio2_ | 375 | ···········<input·type="radio"·name="state"·value="loop"·id="_anim_radio2_facc3faa0a6c42b992b25436ab4155f0" |
376 | ··················checked> | 376 | ··················checked> |
377 | ···········<label·for="_anim_radio2_ | 377 | ···········<label·for="_anim_radio2_facc3faa0a6c42b992b25436ab4155f0">Loop</label> |
378 | ···········<input·type="radio"·name="state"·value="reflect"·id="_anim_radio3_ | 378 | ···········<input·type="radio"·name="state"·value="reflect"·id="_anim_radio3_facc3faa0a6c42b992b25436ab4155f0" |
379 | ··················> | 379 | ··················> |
380 | ···········<label·for="_anim_radio3_ | 380 | ···········<label·for="_anim_radio3_facc3faa0a6c42b992b25436ab4155f0">Reflect</label> |
381 | ·········</form> | 381 | ·········</form> |
382 | ·······</div> | 382 | ·······</div> |
383 | ·····</div> | 383 | ·····</div> |
384 | ·····<script·language="javascript"> | 384 | ·····<script·language="javascript"> |
385 | ·······/*·Instantiate·the·Animation·class.·*/ | 385 | ·······/*·Instantiate·the·Animation·class.·*/ |
386 | ·······/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ | 386 | ·······/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ |
387 | ·······(function()·{ | 387 | ·······(function()·{ |
388 | ·········var·img_id·=·"_anim_imge21c09fd3d594f3dafc0db417e1ded06"; | ||
389 | ·········var·slider_id·=·"_anim_slidere21c09fd3d594f3dafc0db417e1ded06"; | ||
390 | ·········var· | 388 | ·········var·img_id·=·"_anim_imgfacc3faa0a6c42b992b25436ab4155f0"; |
389 | ·········var·slider_id·=·"_anim_sliderfacc3faa0a6c42b992b25436ab4155f0"; | ||
390 | ·········var·loop_select_id·=·"_anim_loop_selectfacc3faa0a6c42b992b25436ab4155f0"; | ||
391 | ·········var·frames·=·new·Array(12); | 391 | ·········var·frames·=·new·Array(12); |
392 | ···· | 392 | ···· |
393 | ·······frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ | 393 | ·······frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ |
394 | ·····bGliIHZlcnNpb24zLjEwLjErZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvzRIYmAAAAAlw\ | 394 | ·····bGliIHZlcnNpb24zLjEwLjErZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvzRIYmAAAAAlw\ |
395 | ·····SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ | 395 | ·····SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ |
396 | ·····MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ | 396 | ·····MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ |
397 | ·····CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ | 397 | ·····CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ |
Offset 2921, 15 lines modified | Offset 2921, 15 lines modified | ||
2921 | ·····GQIgAACAyRAAAQAATOb/AE4FOoe2jc3oAAAAAElFTkSuQmCC\ | 2921 | ·····GQIgAACAyRAAAQAATOb/AE4FOoe2jc3oAAAAAElFTkSuQmCC\ |
2922 | ·····" | 2922 | ·····" |
2923 | ·········/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before | 2923 | ·········/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before |
2924 | ············the·object·is·initialized.·*/ | 2924 | ············the·object·is·initialized.·*/ |
2925 | ·········setTimeout(function()·{ | 2925 | ·········setTimeout(function()·{ |
2926 | ·············anim | 2926 | ·············animfacc3faa0a6c42b992b25436ab4155f0·=·new·Animation(frames,·img_id,·slider_id,·500.0, |
2927 | ······································loop_select_id); | 2927 | ······································loop_select_id); |
2928 | ·········},·0); | 2928 | ·········},·0); |
2929 | ·······})() | 2929 | ·······})() |
2930 | ·····</script> | 2930 | ·····</script> |
Offset 2946, 15 lines modified | Offset 2946, 15 lines modified | ||
2946 | ···example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient | 2946 | ···example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient |
2947 | ···approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn | 2947 | ···approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn |
2948 | ···the·combination·of·igraph·and·matplotlib. | 2948 | ···the·combination·of·igraph·and·matplotlib. |
2949 | ..·rst-class::·sphx-glr-timing | 2949 | ..·rst-class::·sphx-glr-timing |
2950 | ···**Total·running·time·of·the·script:**·(0·minutes· | 2950 | ···**Total·running·time·of·the·script:**·(0·minutes·2.292·seconds) |
2951 | ..·_sphx_glr_download_tutorials_ring_animation.py: | 2951 | ..·_sphx_glr_download_tutorials_ring_animation.py: |
2952 | ..·only::·html | 2952 | ..·only::·html |
2953 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 2953 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 41, 15 lines modified | Offset 41, 15 lines modified | ||
41 | oOnce·#Loop·oReflect | 41 | oOnce·#Loop·oReflect |
42 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·82-90·..·note::·We·use·*igraph*'s·:meth: | 42 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·82-90·..·note::·We·use·*igraph*'s·:meth: |
43 | `Graph.subgraph()`·(see·:meth:`igraph.GraphBase.induced_subgraph`)·in·order·to | 43 | `Graph.subgraph()`·(see·:meth:`igraph.GraphBase.induced_subgraph`)·in·order·to |
44 | obtain·a·section·of·the·ring·graph·at·a·time·for·each·frame.·While·sufficient | 44 | obtain·a·section·of·the·ring·graph·at·a·time·for·each·frame.·While·sufficient |
45 | for·an·easy·example,·this·approach·is·not·very·efficient.·Thinking·of·more | 45 | for·an·easy·example,·this·approach·is·not·very·efficient.·Thinking·of·more |
46 | efficient·approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to | 46 | efficient·approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to |
47 | learn·the·combination·of·igraph·and·matplotlib.·..·rst-class::·sphx-glr-timing | 47 | learn·the·combination·of·igraph·and·matplotlib.·..·rst-class::·sphx-glr-timing |
48 | **Total·running·time·of·the·script:**·(0·minutes· | 48 | **Total·running·time·of·the·script:**·(0·minutes·2.292·seconds)·.. |
49 | _sphx_glr_download_tutorials_ring_animation.py:·..·only::·html·..·container:: | 49 | _sphx_glr_download_tutorials_ring_animation.py:·..·only::·html·..·container:: |
50 | sphx-glr-footer·sphx-glr-footer-example·..·container::·sphx-glr-download·sphx- | 50 | sphx-glr-footer·sphx-glr-footer-example·..·container::·sphx-glr-download·sphx- |
51 | glr-download-jupyter·:download:`Download·Jupyter·notebook:·ring_animation.ipynb | 51 | glr-download-jupyter·:download:`Download·Jupyter·notebook:·ring_animation.ipynb |
52 | `·..·container::·sphx-glr-download·sphx-glr-download-python·:download:`Download | 52 | `·..·container::·sphx-glr-download·sphx-glr-download-python·:download:`Download |
53 | Python·source·code:·ring_animation.py·`·..·container::·sphx-glr-download·sphx- | 53 | Python·source·code:·ring_animation.py·`·..·container::·sphx-glr-download·sphx- |
54 | glr-download-zip·:download:`Download·zipped:·ring_animation.zip·`·..·only:: | 54 | glr-download-zip·:download:`Download·zipped:·ring_animation.zip·`·..·only:: |
55 | html·..·rst-class::·sphx-glr-signature·`Gallery·generated·by·Sphinx-Gallery | 55 | html·..·rst-class::·sphx-glr-signature·`Gallery·generated·by·Sphinx-Gallery |
Offset 189, 15 lines modified | Offset 189, 15 lines modified | ||
189 | ..·rst-class::·sphx-glr-timing | 189 | ..·rst-class::·sphx-glr-timing |
190 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 190 | ···**Total·running·time·of·the·script:**·(0·minutes·0.111·seconds) |
191 | ..·_sphx_glr_download_tutorials_shortest_path_visualisation.py: | 191 | ..·_sphx_glr_download_tutorials_shortest_path_visualisation.py: |
192 | ..·only::·html | 192 | ..·only::·html |
193 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 193 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 88, 15 lines modified | Offset 88, 15 lines modified | ||
88 | ..·rst-class::·sphx-glr-script-out | 88 | ..·rst-class::·sphx-glr-script-out |
89 | ·..·code-block::·none | 89 | ·..·code-block::·none |
90 | ····<igraph.Graph·object·at·0xffff | 90 | ····<igraph.Graph·object·at·0xffff99271050> |
91 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·38-40 | 91 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·38-40 |
92 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let's | 92 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let's |
93 | choose·a·consistent·visual·style: | 93 | choose·a·consistent·visual·style: |
Offset 161, 15 lines modified | Offset 161, 15 lines modified | ||
161 | ..·rst-class::·sphx-glr-timing | 161 | ..·rst-class::·sphx-glr-timing |
162 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 162 | ···**Total·running·time·of·the·script:**·(0·minutes·0.269·seconds) |
163 | ..·_sphx_glr_download_tutorials_simplify.py: | 163 | ..·_sphx_glr_download_tutorials_simplify.py: |
164 | ..·only::·html | 164 | ..·only::·html |
165 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 165 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 161, 15 lines modified | Offset 161, 15 lines modified | ||
161 | ..·note:: | 161 | ..·note:: |
162 | ··To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, | 162 | ··To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, |
163 | ··you·can·call·`ax.invert_yaxis()`·before·`plt.show()`. | 163 | ··you·can·call·`ax.invert_yaxis()`·before·`plt.show()`. |
164 | ..·rst-class::·sphx-glr-timing | 164 | ..·rst-class::·sphx-glr-timing |
165 | ···**Total·running·time·of·the·script:**·(0·minutes·0.4 | 165 | ···**Total·running·time·of·the·script:**·(0·minutes·0.428·seconds) |
166 | ..·_sphx_glr_download_tutorials_spanning_trees.py: | 166 | ..·_sphx_glr_download_tutorials_spanning_trees.py: |
167 | ..·only::·html | 167 | ..·only::·html |
168 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 168 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 179, 15 lines modified | Offset 179, 15 lines modified | ||
179 | ..·rst-class::·sphx-glr-timing | 179 | ..·rst-class::·sphx-glr-timing |
180 | ···**Total·running·time·of·the·script:**·(0·minutes·0.11 | 180 | ···**Total·running·time·of·the·script:**·(0·minutes·0.119·seconds) |
181 | ..·_sphx_glr_download_tutorials_topological_sort.py: | 181 | ..·_sphx_glr_download_tutorials_topological_sort.py: |
182 | ..·only::·html | 182 | ..·only::·html |
183 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 183 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 212, 15 lines modified | Offset 212, 15 lines modified | ||
212 | ..·rst-class::·sphx-glr-timing | 212 | ..·rst-class::·sphx-glr-timing |
213 | ···**Total·running·time·of·the·script:**·(0·minutes· | 213 | ···**Total·running·time·of·the·script:**·(0·minutes·2.358·seconds) |
214 | ..·_sphx_glr_download_tutorials_visual_style.py: | 214 | ..·_sphx_glr_download_tutorials_visual_style.py: |
215 | ..·only::·html | 215 | ..·only::·html |
216 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 216 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 155, 15 lines modified | Offset 155, 15 lines modified | ||
155 | ..·rst-class::·sphx-glr-timing | 155 | ..·rst-class::·sphx-glr-timing |
156 | ···**Total·running·time·of·the·script:**·(0·minutes· | 156 | ···**Total·running·time·of·the·script:**·(0·minutes·9.896·seconds) |
157 | ..·_sphx_glr_download_tutorials_visualize_cliques.py: | 157 | ..·_sphx_glr_download_tutorials_visualize_cliques.py: |
158 | ..·only::·html | 158 | ..·only::·html |
159 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 159 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 153, 15 lines modified | Offset 153, 15 lines modified | ||
153 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, | 153 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, |
154 | check·out·:ref:`tutorials-cluster-graph`. | 154 | check·out·:ref:`tutorials-cluster-graph`. |
155 | ..·rst-class::·sphx-glr-timing | 155 | ..·rst-class::·sphx-glr-timing |
156 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 156 | ···**Total·running·time·of·the·script:**·(0·minutes·0.783·seconds) |
157 | ..·_sphx_glr_download_tutorials_visualize_communities.py: | 157 | ..·_sphx_glr_download_tutorials_visualize_communities.py: |
158 | ..·only::·html | 158 | ..·only::·html |
159 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 159 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
Offset 457, 127 lines modified | Offset 457, 127 lines modified | ||
457 | ····"terms":·{ | 457 | ····"terms":·{ |
458 | ········"":·[0,·6,·7,·8,·10,·11,·12,·13,·14,·15,·16,·18,·25,·26,·28,·29,·30,·33,·34,·35], | 458 | ········"":·[0,·6,·7,·8,·10,·11,·12,·13,·14,·15,·16,·18,·25,·26,·28,·29,·30,·33,·34,·35], |
459 | ········"0":·[0,·3,·4,·7,·8,·9,·10,·11,·12,·13,·14,·15,·16,·17,·18,·19,·20,·22,·23,·24,·25,·26,·27,·28,·29,·30,·31,·32,·33,·34,·35,·36], | 459 | ········"0":·[0,·3,·4,·7,·8,·9,·10,·11,·12,·13,·14,·15,·16,·17,·18,·19,·20,·22,·23,·24,·25,·26,·27,·28,·29,·30,·31,·32,·33,·34,·35,·36], |
460 | ········"000":·7, | 460 | ········"000":·7, |
461 | ········"0088ff":·[7,·8], | 461 | ········"0088ff":·[7,·8], |
462 | ········"01":·[7,·8], | 462 | ········"01":·[7,·8], |
463 | ········"02":·[7,·8], | 463 | ········"02":·[7,·8], |
464 | ········"049":·14, | ||
465 | ········"05":·[7,·8], | 464 | ········"05":·[7,·8], |
466 | ········"0 | 465 | ········"067":·10, |
467 | ········"08f":·[7,·8], | 466 | ········"08f":·[7,·8], |
468 | ········"0xffff | 467 | ········"0xffff8a633250":·11, |
469 | ········"0xffff | 468 | ········"0xffff99271050":·30, |
470 | ········"0xffff9 | 469 | ········"0xffff9c11a050":·18, |
471 | ········"1":·[0,·4,·5,·6,·7,·8,·9,·10,·11,·12,·13,·14,·15,·16,·18,·19,·20,·22,·23,·24,·25,·26,·27,·28,·29,·30,·32,·33,·34,·35,·36], | 470 | ········"1":·[0,·4,·5,·6,·7,·8,·9,·10,·11,·12,·13,·14,·15,·16,·18,·19,·20,·22,·23,·24,·25,·26,·27,·28,·29,·30,·32,·33,·34,·35,·36], |
472 | ········"10":·[0,·4,·5,·7,·8,·10,·12,·13,·14,·15,·25,·28], | 471 | ········"10":·[0,·4,·5,·7,·8,·10,·12,·13,·14,·15,·25,·28], |
473 | ········"100":·[0,·7,·8,·14,·16,·18,·35,·36], | 472 | ········"100":·[0,·7,·8,·14,·16,·18,·35,·36], |
474 | ········"10000":·8, | 473 | ········"10000":·8, |
475 | ········"105":·23, | ||
476 | ········"11":·[12,·13,·27,·28], | 474 | ········"11":·[12,·13,·27,·28], |
475 | ········"111":·29, | ||
477 | ········"111223":·4, | 476 | ········"111223":·4, |
478 | ········"112":·32, | ||
479 | ········"112222":·4, | 477 | ········"112222":·4, |
478 | ········"119":·32, | ||
480 | ········"12":·[7,·8,·13,·28], | 479 | ········"12":·[7,·8,·13,·28], |
481 | ········"1205":·[7,·8], | 480 | ········"1205":·[7,·8], |
482 | ········"1252":·4, | 481 | ········"1252":·4, |
483 | ········"126":·[7,·8], | 482 | ········"126":·[7,·8], |
484 | ········"127":·[7,·8], | 483 | ········"127":·[7,·8], |
485 | ········"1282":·27, | 484 | ········"1282":·27, |
485 | ········"129":·23, | ||
486 | ········"13":·[13,·27], | 486 | ········"13":·[13,·27], |
487 | ········"134":·11, | 487 | ········"134":·11, |
488 | ········"136":·24, | 488 | ········"136":·24, |
489 | ········"13 | 489 | ········"137":·16, |
490 | ········"14":·[10,·13], | 490 | ········"14":·[10,·13], |
491 | ········"14 | 491 | ········"145":·9, |
492 | ········"143":·16, | ||
493 | ········"15":·[7,·8,·14,·16,·17,·19,·20,·22,·33], | 492 | ········"15":·[7,·8,·14,·16,·17,·19,·20,·22,·33], |
494 | ········"150":·10, | 493 | ········"150":·10, |
495 | ········"16":·10, | 494 | ········"16":·10, |
495 | ········"165":·12, | ||
496 | ········"1695":·5, | 496 | ········"1695":·5, |
497 | ········"170":·30, | ||
498 | ········"172":·12, | ||
499 | ········"18":·[7,·8,·19,·26], | 497 | ········"18":·[7,·8,·19,·26], |
500 | ········"2":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·15,·18,·19,·22,·23,·25,·27,·28,·29,·30,·32,·33,·36], | 498 | ········"2":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·15,·18,·19,·22,·23,·25,·27,·28,·29,·30,·32,·33,·36], |
501 | ········"20":·[7,·8,·10,·14,·19,·24,·26,·30,·33,·35,·36], | 499 | ········"20":·[7,·8,·10,·14,·19,·24,·26,·30,·33,·35,·36], |
502 | ········"200":·[16,·17], | 500 | ········"200":·[16,·17], |
503 | ········"2006":·5, | 501 | ········"2006":·5, |
504 | ········"2009":·[7,·8], | 502 | ········"2009":·[7,·8], |
505 | ········"201":·24, | 503 | ········"201":·24, |
506 | ········"2021":·[7,·8], | 504 | ········"2021":·[7,·8], |
507 | ········"2022":·3, | 505 | ········"2022":·3, |
508 | ········"21":·19, | 506 | ········"21":·19, |
509 | ········"22":·[7,·8], | 507 | ········"22":·[7,·8], |
510 | ········"222":·20, | 508 | ········"222":·20, |
511 | ········"23":·[7,·8,·19], | 509 | ········"23":·[7,·8,·19], |
512 | ········"2386714":·8, | 510 | ········"2386714":·8, |
513 | ········"246":·29, | ||
514 | ········"25":·[7,·8,·22,·32], | 511 | ········"25":·[7,·8,·22,·32], |
515 | ········"255":·[7,·8,·14,·17,·33], | 512 | ········"255":·[7,·8,·14,·17,·33], |
513 | ········"269":·30, | ||
516 | ········"270":·[7,·8], | 514 | ········"270":·[7,·8], |
517 | ········"274":·22, | ||
518 | ········"28":·19, | 515 | ········"28":·19, |
516 | ········"280":·22, | ||
517 | ········"286":·27, | ||
519 | ········"29":·[7,·8], | 518 | ········"29":·[7,·8], |
519 | ········"292":·28, | ||
520 | ········"2d":·[7,·8,·18,·28,·31,·36], | 520 | ········"2d":·[7,·8,·18,·28,·31,·36], |
521 | ········"2r09ej221sk2k5":·25, | 521 | ········"2r09ej221sk2k5":·25, |
522 | ········"3":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·16,·18,·22,·23,·24,·27,·28,·29,·30,·31,·32,·33,·34,·36], | 522 | ········"3":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·16,·18,·22,·23,·24,·27,·28,·29,·30,·31,·32,·33,·34,·36], |
523 | ········"30":·[7,·8,·9,·11,·12,·13,·18,·20,·27,·33], | 523 | ········"30":·[7,·8,·9,·11,·12,·13,·18,·20,·27,·33], |
524 | ········"300":·[7,·8], | 524 | ········"300":·[7,·8], |
525 | ········"30745059034535":·10, | 525 | ········"30745059034535":·10, |
526 | ········"31":·[7,·8], | 526 | ········"31":·[7,·8], |
527 | ········"3203ejew332323":·25, | 527 | ········"3203ejew332323":·25, |
528 | ········"320eljl3lk3239":·25, | 528 | ········"320eljl3lk3239":·25, |
529 | ········"34":·[7,·8], | 529 | ········"34":·[7,·8], |
530 | ········"35":·19, | 530 | ········"35":·19, |
531 | ········"35 | 531 | ········"350":·24, |
532 | ········"358":·33, | ||
532 | ········"36":·31, | 533 | ········"36":·31, |
533 | ········"376":·[7,·8], | 534 | ········"376":·[7,·8], |
534 | ········"378":·28, | ||
535 | ········"38":·22, | 535 | ········"38":·22, |
536 | ········"3d":·[7,·8,·36], | 536 | ········"3d":·[7,·8,·36], |
537 | ········"4":·[0,·4,·7,·8,·9,·11,·12,·13,·14,·18,·22,·23,·27,·29,·30,·32,·33,·34,·36], | 537 | ········"4":·[0,·4,·7,·8,·9,·11,·12,·13,·14,·18,·22,·23,·27,·29,·30,·32,·33,·34,·36], |
538 | ········"40":·26, | 538 | ········"40":·26, |
539 | ········"407":·13, | ||
539 | ········"40m11919332msa":·25, | 540 | ········"40m11919332msa":·25, |
540 | ········"42 | 541 | ········"428":·31, |
541 | ········"430":·31, | ||
542 | ········"44":·4, | 542 | ········"44":·4, |
543 | ········"45":·26, | 543 | ········"45":·26, |
544 | ········"458":·35, | ||
545 | ········"47":·[7,·8], | 544 | ········"47":·[7,·8], |
546 | ········"477":·10, | 545 | ········"477":·10, |
547 | ········"494":·27, | 546 | ········"494":·27, |
548 | ········"499":·20, | ||
549 | ········"4r4320dkqpdokk":·25, | 547 | ········"4r4320dkqpdokk":·25, |
550 | ········"5":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·15,·22,·23,·24,·26,·27,·28,·29,·31,·32,·33,·34,·36], | 548 | ········"5":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·15,·22,·23,·24,·26,·27,·28,·29,·31,·32,·33,·34,·36], |
551 | ········"50":·[7,·8,·10,·17], | 549 | ········"50":·[7,·8,·10,·17], |
552 | ········"500":·28, | 550 | ········"500":·28, |
553 | ········"50 | 551 | ········"504":·20, |
554 | ········"514":·34, | ||
555 | ········"516":·[7,·8], | 552 | ········"516":·[7,·8], |
556 | ········"517":·6, | 553 | ········"517":·6, |
554 | ········"519":·14, | ||
557 | ········"52 | 555 | ········"522":·15, |
556 | ········"548":·25, | ||
558 | ········"57 | 557 | ········"577":·17, |
559 | ········"6":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·23,·29,·31], | 558 | ········"6":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·23,·29,·31], |
560 | ········"600":·[7,·8], | 559 | ········"600":·[7,·8], |
561 | ········"65":·[22,·26], | 560 | ········"65":·[22,·26], |
562 | ········"666":·29, | 561 | ········"666":·29, |
562 | ········"670":·18, | ||
563 | ········"7":·[4,·7,·8,·9,·10,·11,·12,·13,·14,·17,·23,·27,·29], | 563 | ········"7":·[4,·7,·8,·9,·10,·11,·12,·13,·14,·17,·23,·27,·29], |
564 | ········"7142cf":·27, | 564 | ········"7142cf":·27, |
565 | ········"7 | 565 | ········"715":·26, |
566 | ········"753":·10, | 566 | ········"753":·10, |
567 | ········"78":·[7,·8], | 567 | ········"78":·[7,·8], |
568 | ········"783":·35, | ||
568 | ········"789dsadafj32jj":·25, | 569 | ········"789dsadafj32jj":·25, |
569 | ········"8":·[7,·8,·9,·10,·11,·12,·13,·14,·18,·23,·26,·29,·3 | 570 | ········"8":·[7,·8,·9,·10,·11,·12,·13,·14,·18,·23,·26,·29,·36], |
Max diff block lines reached; 431/4593 bytes (9.38%) of diff not shown. |
Offset 147, 15 lines modified | Offset 147, 15 lines modified | ||
147 | ····<span·class="n">vertex_frame_width</span>·<span·class="o">=</span>·<span·class="p">[</span><span·class="mi">3</span>·<span·class="k">if</span>·<span·class="n">v</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.VertexSeq.html"·title="igraph.VertexSeq"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">articulation_points</span></a>·<span·class="k">else</span>·<span·class="mi">1</span>·<span·class="k">for</span>·<span·class="n">v</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.Graph.html#vs"·title="igraph.Graph.vs"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">vs</span></a><span·class="p">],</span> | 147 | ····<span·class="n">vertex_frame_width</span>·<span·class="o">=</span>·<span·class="p">[</span><span·class="mi">3</span>·<span·class="k">if</span>·<span·class="n">v</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.VertexSeq.html"·title="igraph.VertexSeq"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">articulation_points</span></a>·<span·class="k">else</span>·<span·class="mi">1</span>·<span·class="k">for</span>·<span·class="n">v</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.Graph.html#vs"·title="igraph.Graph.vs"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">vs</span></a><span·class="p">],</span> |
148 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mf">0.8</span><span·class="p">,</span> | 148 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mf">0.8</span><span·class="p">,</span> |
149 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s1">'gray'</span> | 149 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s1">'gray'</span> |
150 | <span·class="p">)</span> | 150 | <span·class="p">)</span> |
151 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 151 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
152 | </pre></div> | 152 | </pre></div> |
153 | </div> | 153 | </div> |
154 | <img·src="../_images/sphx_glr_articulation_points_001.png"·srcset="../_images/sphx_glr_articulation_points_001.png"·alt="articulation·points"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.1 | 154 | <img·src="../_images/sphx_glr_articulation_points_001.png"·srcset="../_images/sphx_glr_articulation_points_001.png"·alt="articulation·points"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.145·seconds)</p> |
155 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-articulation-points-py"> | 155 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-articulation-points-py"> |
156 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 156 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
157 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/242671ca29595146630270920763946e/articulation_points.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">articulation_points.ipynb</span></code></a></p> | 157 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/242671ca29595146630270920763946e/articulation_points.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">articulation_points.ipynb</span></code></a></p> |
158 | </div> | 158 | </div> |
159 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 159 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
160 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/7716af8970a6076243a3268ecb8571bb/articulation_points.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">articulation_points.py</span></code></a></p> | 160 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/7716af8970a6076243a3268ecb8571bb/articulation_points.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">articulation_points.py</span></code></a></p> |
161 | </div> | 161 | </div> |
Offset 67, 15 lines modified | Offset 67, 15 lines modified | ||
67 | in·_\x8g_\x8._\x8v_\x8s], | 67 | in·_\x8g_\x8._\x8v_\x8s], |
68 | ····vertex_frame_width·=·[3·if·v·in·_\x8a_\x8r_\x8t_\x8i_\x8c_\x8u_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8p_\x8o_\x8i_\x8n_\x8t_\x8s·else·1·for·v·in·_\x8g_\x8._\x8v_\x8s], | 68 | ····vertex_frame_width·=·[3·if·v·in·_\x8a_\x8r_\x8t_\x8i_\x8c_\x8u_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8__\x8p_\x8o_\x8i_\x8n_\x8t_\x8s·else·1·for·v·in·_\x8g_\x8._\x8v_\x8s], |
69 | ····edge_width=0.8, | 69 | ····edge_width=0.8, |
70 | ····edge_color='gray' | 70 | ····edge_color='gray' |
71 | ) | 71 | ) |
72 | plt.show() | 72 | plt.show() |
73 | [articulation·points] | 73 | [articulation·points] |
74 | T\x8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p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
79 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 79 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
80 | =============================================================================== | 80 | =============================================================================== |
81 | ©·Copyright·2010-2025,·The·igraph·development·team. | 81 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 204, 15 lines modified | Offset 204, 15 lines modified | ||
204 | </div> | 204 | </div> |
205 | <img·src="../_images/sphx_glr_betweenness_001.png"·srcset="../_images/sphx_glr_betweenness_001.png"·alt="betweenness"·class·=·"sphx-glr-single-img"/><div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="n">vertices</span><span·class="p">:</span>·<span·class="mf">0.0</span>·<span·class="o">-</span>·<span·class="mf">14.0</span> | 205 | <img·src="../_images/sphx_glr_betweenness_001.png"·srcset="../_images/sphx_glr_betweenness_001.png"·alt="betweenness"·class·=·"sphx-glr-single-img"/><div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="n">vertices</span><span·class="p">:</span>·<span·class="mf">0.0</span>·<span·class="o">-</span>·<span·class="mf">14.0</span> |
206 | <span·class="n">edges</span><span·class="p">:</span>·<span·class="mf">1.5</span>·<span·class="o">-</span>·<span·class="mf">16.0</span> | 206 | <span·class="n">edges</span><span·class="p">:</span>·<span·class="mf">1.5</span>·<span·class="o">-</span>·<span·class="mf">16.0</span> |
207 | <span·class="n">vertices</span><span·class="p">:</span>·<span·class="mf">0.0</span>·<span·class="o">-</span>·<span·class="mf">753.8235063912693</span> | 207 | <span·class="n">vertices</span><span·class="p">:</span>·<span·class="mf">0.0</span>·<span·class="o">-</span>·<span·class="mf">753.8235063912693</span> |
208 | <span·class="n">edges</span><span·class="p">:</span>·<span·class="mf">8.951984126984126</span>·<span·class="o">-</span>·<span·class="mf">477.30745059034535</span> | 208 | <span·class="n">edges</span><span·class="p">:</span>·<span·class="mf">8.951984126984126</span>·<span·class="o">-</span>·<span·class="mf">477.30745059034535</span> |
209 | </pre></div> | 209 | </pre></div> |
210 | </div> | 210 | </div> |
211 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 211 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·2.067·seconds)</p> |
212 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-betweenness-py"> | 212 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-betweenness-py"> |
213 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 213 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
214 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/5913b4a7cb974d0c722c100ffe6a770f/betweenness.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">betweenness.ipynb</span></code></a></p> | 214 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/5913b4a7cb974d0c722c100ffe6a770f/betweenness.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">betweenness.ipynb</span></code></a></p> |
215 | </div> | 215 | </div> |
216 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 216 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
217 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a7ec70a8d202cc065942f63712e4c54e/betweenness.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">betweenness.py</span></code></a></p> | 217 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a7ec70a8d202cc065942f63712e4c54e/betweenness.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">betweenness.py</span></code></a></p> |
218 | </div> | 218 | </div> |
Offset 126, 15 lines modified | Offset 126, 15 lines modified | ||
126 | fig.tight_layout(h_pad=1) | 126 | fig.tight_layout(h_pad=1) |
127 | plt.show() | 127 | plt.show() |
128 | [betweenness] | 128 | [betweenness] |
129 | vertices:·0.0·-·14.0 | 129 | vertices:·0.0·-·14.0 |
130 | edges:·1.5·-·16.0 | 130 | edges:·1.5·-·16.0 |
131 | vertices:·0.0·-·753.8235063912693 | 131 | vertices:·0.0·-·753.8235063912693 |
132 | edges:·8.951984126984126·-·477.30745059034535 | 132 | edges:·8.951984126984126·-·477.30745059034535 |
133 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes· | 133 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·2.067·seconds) |
134 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8b_\x8e_\x8t_\x8w_\x8e_\x8e_\x8n_\x8n_\x8e_\x8s_\x8s_\x8._\x8i_\x8p_\x8y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l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 137 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
138 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 138 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
139 | =============================================================================== | 139 | =============================================================================== |
140 | ©·Copyright·2010-2025,·The·igraph·development·team. | 140 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 176, 15 lines modified | Offset 176, 15 lines modified | ||
176 | ····<span·class="n">vertex_label</span><span·class="o">=</span><span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">vcount</span><span·class="p">()),</span> | 176 | ····<span·class="n">vertex_label</span><span·class="o">=</span><span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">vcount</span><span·class="p">()),</span> |
177 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> | 177 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> |
178 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">3</span>·<span·class="k">if</span>·<span·class="n">e</span><span·class="o">.</span><span·class="n">target</span>·<span·class="o">==</span>·<a·href="/en/latest/api/igraph.Matching.html#match_of"·title="igraph.Matching.match_of"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-method"><span·class="n">matching</span><span·class="o">.</span><span·class="n">match_of</span></a><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">source</span><span·class="p">)</span>·<span·class="k">else</span>·<span·class="mf">1.0</span>·<span·class="k">for</span>·<span·class="n">e</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">],</span> | 178 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="p">[</span><span·class="mi">3</span>·<span·class="k">if</span>·<span·class="n">e</span><span·class="o">.</span><span·class="n">target</span>·<span·class="o">==</span>·<a·href="/en/latest/api/igraph.Matching.html#match_of"·title="igraph.Matching.match_of"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-method"><span·class="n">matching</span><span·class="o">.</span><span·class="n">match_of</span></a><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">source</span><span·class="p">)</span>·<span·class="k">else</span>·<span·class="mf">1.0</span>·<span·class="k">for</span>·<span·class="n">e</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">],</span> |
179 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="p">[</span><span·class="s2">"red"</span>·<span·class="k">if</span>·<span·class="n">e</span><span·class="o">.</span><span·class="n">target</span>·<span·class="o">==</span>·<a·href="/en/latest/api/igraph.Matching.html#match_of"·title="igraph.Matching.match_of"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-method"><span·class="n">matching</span><span·class="o">.</span><span·class="n">match_of</span></a><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">source</span><span·class="p">)</span>·<span·class="k">else</span>·<span·class="s2">"black"</span>·<span·class="k">for</span>·<span·class="n">e</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">]</span> | 179 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="p">[</span><span·class="s2">"red"</span>·<span·class="k">if</span>·<span·class="n">e</span><span·class="o">.</span><span·class="n">target</span>·<span·class="o">==</span>·<a·href="/en/latest/api/igraph.Matching.html#match_of"·title="igraph.Matching.match_of"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-method"><span·class="n">matching</span><span·class="o">.</span><span·class="n">match_of</span></a><span·class="p">(</span><span·class="n">e</span><span·class="o">.</span><span·class="n">source</span><span·class="p">)</span>·<span·class="k">else</span>·<span·class="s2">"black"</span>·<span·class="k">for</span>·<span·class="n">e</span>·<span·class="ow">in</span>·<a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">]</span> |
180 | <span·class="p">)</span> | 180 | <span·class="p">)</span> |
181 | </pre></div> | 181 | </pre></div> |
182 | </div> | 182 | </div> |
183 | <img·src="../_images/sphx_glr_bipartite_matching_001.png"·srcset="../_images/sphx_glr_bipartite_matching_001.png"·alt="bipartite·matching"·class·=·"sphx-glr-single-img"/><div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="o"><</span><span·class="n">igraph</span><span·class="o">.</span><span·class="n">drawing</span><span·class="o">.</span><span·class="n">matplotlib</span><span·class="o">.</span><span·class="n">graph</span><span·class="o">.</span><span·class="n">GraphArtist</span>·<span·class="nb">object</span>·<span·class="n">at</span>·<span·class="mh">0xffff | 183 | <img·src="../_images/sphx_glr_bipartite_matching_001.png"·srcset="../_images/sphx_glr_bipartite_matching_001.png"·alt="bipartite·matching"·class·=·"sphx-glr-single-img"/><div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="o"><</span><span·class="n">igraph</span><span·class="o">.</span><span·class="n">drawing</span><span·class="o">.</span><span·class="n">matplotlib</span><span·class="o">.</span><span·class="n">graph</span><span·class="o">.</span><span·class="n">GraphArtist</span>·<span·class="nb">object</span>·<span·class="n">at</span>·<span·class="mh">0xffff8a633250</span><span·class="o">></span> |
184 | </pre></div> | 184 | </pre></div> |
185 | </div> | 185 | </div> |
186 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.134·seconds)</p> | 186 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.134·seconds)</p> |
187 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bipartite-matching-py"> | 187 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bipartite-matching-py"> |
188 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 188 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
189 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/9614fc864a096647cd89cc7ebaeb102a/bipartite_matching.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">bipartite_matching.ipynb</span></code></a></p> | 189 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/9614fc864a096647cd89cc7ebaeb102a/bipartite_matching.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">bipartite_matching.ipynb</span></code></a></p> |
190 | </div> | 190 | </div> |
Offset 86, 15 lines modified | Offset 86, 15 lines modified | ||
86 | ····vertex_color="lightblue", | 86 | ····vertex_color="lightblue", |
87 | ····edge_width=[3·if·e.target·==·_\x8m_\x8a_\x8t_\x8c_\x8h_\x8i_\x8n_\x8g_\x8._\x8m_\x8a_\x8t_\x8c_\x8h_\x8__\x8o_\x8f(e.source)·else·1.0·for·e·in | 87 | ····edge_width=[3·if·e.target·==·_\x8m_\x8a_\x8t_\x8c_\x8h_\x8i_\x8n_\x8g_\x8._\x8m_\x8a_\x8t_\x8c_\x8h_\x8__\x8o_\x8f(e.source)·else·1.0·for·e·in |
88 | _\x8g_\x8._\x8e_\x8s], | 88 | _\x8g_\x8._\x8e_\x8s], |
89 | ····edge_color=["red"·if·e.target·==·_\x8m_\x8a_\x8t_\x8c_\x8h_\x8i_\x8n_\x8g_\x8._\x8m_\x8a_\x8t_\x8c_\x8h_\x8__\x8o_\x8f(e.source)·else·"black" | 89 | ····edge_color=["red"·if·e.target·==·_\x8m_\x8a_\x8t_\x8c_\x8h_\x8i_\x8n_\x8g_\x8._\x8m_\x8a_\x8t_\x8c_\x8h_\x8__\x8o_\x8f(e.source)·else·"black" |
90 | for·e·in·_\x8g_\x8._\x8e_\x8s] | 90 | for·e·in·_\x8g_\x8._\x8e_\x8s] |
91 | ) | 91 | ) |
92 | [bipartite·matching] | 92 | [bipartite·matching] |
93 | <igraph.drawing.matplotlib.graph.GraphArtist·object·at·0xffff | 93 | <igraph.drawing.matplotlib.graph.GraphArtist·object·at·0xffff8a633250> |
94 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8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8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 99 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
100 | =============================================================================== | 100 | =============================================================================== |
Offset 188, 15 lines modified | Offset 188, 15 lines modified | ||
188 | ····<span·class="n">vertex_label</span><span·class="o">=</span><span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">vcount</span><span·class="p">()),</span> | 188 | ····<span·class="n">vertex_label</span><span·class="o">=</span><span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">vcount</span><span·class="p">()),</span> |
189 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="p">[</span><span·class="s2">"lightblue"</span>·<span·class="k">if</span>·<span·class="n">i</span>·<span·class="o"><</span>·<span·class="mi">9</span>·<span·class="k">else</span>·<span·class="s2">"orange"</span>·<span·class="k">for</span>·<span·class="n">i</span>·<span·class="ow">in</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">11</span><span·class="p">)],</span> | 189 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="p">[</span><span·class="s2">"lightblue"</span>·<span·class="k">if</span>·<span·class="n">i</span>·<span·class="o"><</span>·<span·class="mi">9</span>·<span·class="k">else</span>·<span·class="s2">"orange"</span>·<span·class="k">for</span>·<span·class="n">i</span>·<span·class="ow">in</span>·<span·class="nb">range</span><span·class="p">(</span><span·class="mi">11</span><span·class="p">)],</span> |
190 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="p">[</span><span·class="mf">1.0</span>·<span·class="o">+</span>·<a·href="/en/latest/api/igraph.Flow.html#flow"·title="igraph.Flow.flow"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">flow</span><span·class="o">.</span><span·class="n">flow</span></a><span·class="p">[</span><span·class="n">i</span><span·class="p">]</span>·<span·class="k">for</span>·<span·class="n">i</span>·<span·class="ow">in</span>·<span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">ecount</span><span·class="p">())]</span> | 190 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="p">[</span><span·class="mf">1.0</span>·<span·class="o">+</span>·<a·href="/en/latest/api/igraph.Flow.html#flow"·title="igraph.Flow.flow"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">flow</span><span·class="o">.</span><span·class="n">flow</span></a><span·class="p">[</span><span·class="n">i</span><span·class="p">]</span>·<span·class="k">for</span>·<span·class="n">i</span>·<span·class="ow">in</span>·<span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">ecount</span><span·class="p">())]</span> |
191 | <span·class="p">)</span> | 191 | <span·class="p">)</span> |
192 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 192 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
193 | </pre></div> | 193 | </pre></div> |
194 | </div> | 194 | </div> |
195 | <img·src="../_images/sphx_glr_bipartite_matching_maxflow_001.png"·srcset="../_images/sphx_glr_bipartite_matching_maxflow_001.png"·alt="bipartite·matching·maxflow"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.1 | 195 | <img·src="../_images/sphx_glr_bipartite_matching_maxflow_001.png"·srcset="../_images/sphx_glr_bipartite_matching_maxflow_001.png"·alt="bipartite·matching·maxflow"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.165·seconds)</p> |
196 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bipartite-matching-maxflow-py"> | 196 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bipartite-matching-maxflow-py"> |
197 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 197 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
198 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/80f52b7ca439904ca0fafc31d8c351c8/bipartite_matching_maxflow.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">bipartite_matching_maxflow.ipynb</span></code></a></p> | 198 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/80f52b7ca439904ca0fafc31d8c351c8/bipartite_matching_maxflow.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">bipartite_matching_maxflow.ipynb</span></code></a></p> |
199 | </div> | 199 | </div> |
200 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 200 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
201 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d56003997f3293e821663aebb5b1e9d0/bipartite_matching_maxflow.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">bipartite_matching_maxflow.py</span></code></a></p> | 201 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d56003997f3293e821663aebb5b1e9d0/bipartite_matching_maxflow.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">bipartite_matching_maxflow.py</span></code></a></p> |
202 | </div> | 202 | </div> |
Offset 97, 15 lines modified | Offset 97, 15 lines modified | ||
97 | ····vertex_size=30, | 97 | ····vertex_size=30, |
98 | ····vertex_label=range(_\x8g.vcount()), | 98 | ····vertex_label=range(_\x8g.vcount()), |
99 | ····vertex_color=["lightblue"·if·i·<·9·else·"orange"·for·i·in·range(11)], | 99 | ····vertex_color=["lightblue"·if·i·<·9·else·"orange"·for·i·in·range(11)], |
100 | ····edge_width=[1.0·+·_\x8f_\x8l_\x8o_\x8w_\x8._\x8f_\x8l_\x8o_\x8w[i]·for·i·in·range(_\x8g.ecount())] | 100 | ····edge_width=[1.0·+·_\x8f_\x8l_\x8o_\x8w_\x8._\x8f_\x8l_\x8o_\x8w[i]·for·i·in·range(_\x8g.ecount())] |
101 | ) | 101 | ) |
102 | plt.show() | 102 | plt.show() |
103 | [bipartite·matching·maxflow] | 103 | [bipartite·matching·maxflow] |
104 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.1 | 104 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.165·seconds) |
105 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\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x8s·_\x8N_\x8e_\x8x_\x8t |
110 | =============================================================================== | 110 | =============================================================================== |
111 | ©·Copyright·2010-2025,·The·igraph·development·team. | 111 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 191, 15 lines modified | Offset 191, 15 lines modified | ||
191 | ····<span·class="n">edge_align_label</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>······<span·class="c1">#·make·sure·labels·are·aligned·with·the·edge</span> | 191 | ····<span·class="n">edge_align_label</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span>······<span·class="c1">#·make·sure·labels·are·aligned·with·the·edge</span> |
192 | ····<span·class="n">edge_label</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"label"</span><span·class="p">],</span> | 192 | ····<span·class="n">edge_label</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"label"</span><span·class="p">],</span> |
193 | ····<span·class="n">edge_label_color</span><span·class="o">=</span><span·class="s2">"red"</span> | 193 | ····<span·class="n">edge_label_color</span><span·class="o">=</span><span·class="s2">"red"</span> |
194 | <span·class="p">)</span> | 194 | <span·class="p">)</span> |
195 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 195 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
196 | </pre></div> | 196 | </pre></div> |
197 | </div> | 197 | </div> |
198 | <img·src="../_images/sphx_glr_bridges_002.png"·srcset="../_images/sphx_glr_bridges_002.png"·alt="bridges"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.4 | 198 | <img·src="../_images/sphx_glr_bridges_002.png"·srcset="../_images/sphx_glr_bridges_002.png"·alt="bridges"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.407·seconds)</p> |
199 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bridges-py"> | 199 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bridges-py"> |
200 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 200 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
201 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/0e3dd42ffedbd9a3484b540044bcfdc6/bridges.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">bridges.ipynb</span></code></a></p> | 201 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/0e3dd42ffedbd9a3484b540044bcfdc6/bridges.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">bridges.ipynb</span></code></a></p> |
202 | </div> | 202 | </div> |
203 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 203 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
204 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/bae7aba824f72e4b23fc8060976ad889/bridges.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">bridges.py</span></code></a></p> | 204 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/bae7aba824f72e4b23fc8060976ad889/bridges.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">bridges.py</span></code></a></p> |
205 | </div> | 205 | </div> |
Offset 102, 15 lines modified | Offset 102, 15 lines modified | ||
102 | ····edge_background="#FFF0",····#·transparent·background·color | 102 | ····edge_background="#FFF0",····#·transparent·background·color |
103 | ····edge_align_label=True,······#·make·sure·labels·are·aligned·with·the·edge | 103 | ····edge_align_label=True,······#·make·sure·labels·are·aligned·with·the·edge |
104 | ····edge_label=_\x8g_\x8._\x8e_\x8s["label"], | 104 | ····edge_label=_\x8g_\x8._\x8e_\x8s["label"], |
105 | ····edge_label_color="red" | 105 | ····edge_label_color="red" |
106 | ) | 106 | ) |
107 | plt.show() | 107 | plt.show() |
108 | [bridges] | 108 | [bridges] |
109 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.4 | 109 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.407·seconds) |
110 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8b_\x8r_\x8i_\x8d_\x8g_\x8e_\x8s_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 110 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x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x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
114 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 114 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
115 | =============================================================================== | 115 | =============================================================================== |
116 | ©·Copyright·2010-2025,·The·igraph·development·team. | 116 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 338, 15 lines modified | Offset 338, 15 lines modified | ||
338 | ····<span·class="n">bbox_to_anchor</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mf">1.0</span><span·class="p">),</span> | 338 | ····<span·class="n">bbox_to_anchor</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mf">1.0</span><span·class="p">),</span> |
339 | ····<span·class="n">bbox_transform</span><span·class="o">=</span><span·class="n">ax2</span><span·class="o">.</span><span·class="n">transAxes</span><span·class="p">,</span> | 339 | ····<span·class="n">bbox_transform</span><span·class="o">=</span><span·class="n">ax2</span><span·class="o">.</span><span·class="n">transAxes</span><span·class="p">,</span> |
340 | <span·class="p">)</span> | 340 | <span·class="p">)</span> |
341 | <span·class="n">fig2</span><span·class="o">.</span><span·class="n">set_size_inches</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)</span> | 341 | <span·class="n">fig2</span><span·class="o">.</span><span·class="n">set_size_inches</span><span·class="p">(</span><span·class="mi">10</span><span·class="p">,</span>·<span·class="mi">10</span><span·class="p">)</span> |
342 | </pre></div> | 342 | </pre></div> |
343 | </div> | 343 | </div> |
344 | <img·src="../_images/sphx_glr_cluster_contraction_002.png"·srcset="../_images/sphx_glr_cluster_contraction_002.png"·alt="cluster·contraction"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 344 | <img·src="../_images/sphx_glr_cluster_contraction_002.png"·srcset="../_images/sphx_glr_cluster_contraction_002.png"·alt="cluster·contraction"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·1.519·seconds)</p> |
345 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-cluster-contraction-py"> | 345 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-cluster-contraction-py"> |
346 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 346 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
347 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/f5753ecc0bf36a46d0f61753dfffd31a/cluster_contraction.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">cluster_contraction.ipynb</span></code></a></p> | 347 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/f5753ecc0bf36a46d0f61753dfffd31a/cluster_contraction.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">cluster_contraction.ipynb</span></code></a></p> |
348 | </div> | 348 | </div> |
349 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 349 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
350 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/618e73474ffdd23b6647bbe6721ad6e3/cluster_contraction.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">cluster_contraction.py</span></code></a></p> | 350 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/618e73474ffdd23b6647bbe6721ad6e3/cluster_contraction.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">cluster_contraction.py</span></code></a></p> |
351 | </div> | 351 | </div> |
Offset 238, 15 lines modified | Offset 238, 15 lines modified | ||
238 | ····title='Community:', | 238 | ····title='Community:', |
239 | ····bbox_to_anchor=(0,·1.0), | 239 | ····bbox_to_anchor=(0,·1.0), |
240 | ····bbox_transform=ax2.transAxes, | 240 | ····bbox_transform=ax2.transAxes, |
241 | ) | 241 | ) |
242 | fig2.set_size_inches(10,·10) | 242 | fig2.set_size_inches(10,·10) |
243 | [cluster·contraction] | 243 | [cluster·contraction] |
244 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes· | 244 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·1.519·seconds) |
245 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8c_\x8l_\x8u_\x8s_\x8t_\x8e_\x8r_\x8__\x8c_\x8o_\x8n_\x8t_\x8r_\x8a_\x8c_\x8t_\x8i_\x8o_\x8n_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 245 | _\x8D_\x8o_\x8w_\x8n_\x8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\x8e_\x8d_\x8:_\x8·_\x8c_\x8l_\x8u_\x8s_\x8t_\x8e_\x8r_\x8__\x8c_\x8o_\x8n_\x8t_\x8r_\x8a_\x8c_\x8t_\x8i_\x8o_\x8n_\x8._\x8z_\x8i_\x8p |
248 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 248 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
249 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 249 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
250 | =============================================================================== | 250 | =============================================================================== |
251 | ©·Copyright·2010-2025,·The·igraph·development·team. | 251 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 185, 15 lines modified | Offset 185, 15 lines modified | ||
185 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> | 185 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> |
186 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"black"</span><span·class="p">,</span> | 186 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"black"</span><span·class="p">,</span> |
187 | <span·class="p">)</span> | 187 | <span·class="p">)</span> |
188 | <span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s1">'Complement·of·union·graph'</span><span·class="p">)</span> | 188 | <span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_title</span><span·class="p">(</span><span·class="s1">'Complement·of·union·graph'</span><span·class="p">)</span> |
189 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 189 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
190 | </pre></div> | 190 | </pre></div> |
191 | </div> | 191 | </div> |
192 | <img·src="../_images/sphx_glr_complement_001.png"·srcset="../_images/sphx_glr_complement_001.png"·alt="Original·graph,·Complement·graph,·Union·graph,·Complement·of·union·graph"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.52 | 192 | <img·src="../_images/sphx_glr_complement_001.png"·srcset="../_images/sphx_glr_complement_001.png"·alt="Original·graph,·Complement·graph,·Union·graph,·Complement·of·union·graph"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.522·seconds)</p> |
193 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-complement-py"> | 193 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-complement-py"> |
194 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 194 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
195 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/18a48ac28bf0a7d1df83e5bf8d86cf72/complement.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">complement.ipynb</span></code></a></p> | 195 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/18a48ac28bf0a7d1df83e5bf8d86cf72/complement.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">complement.ipynb</span></code></a></p> |
196 | </div> | 196 | </div> |
197 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 197 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
198 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d1f9b5ec5915b527bd3029f0e97e652e/complement.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">complement.py</span></code></a></p> | 198 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d1f9b5ec5915b527bd3029f0e97e652e/complement.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">complement.py</span></code></a></p> |
199 | </div> | 199 | </div> |
Offset 96, 15 lines modified | Offset 96, 15 lines modified | ||
96 | ····target=axs[1,·1], | 96 | ····target=axs[1,·1], |
97 | ····layout="circle", | 97 | ····layout="circle", |
98 | ····vertex_color="black", | 98 | ····vertex_color="black", |
99 | ) | 99 | ) |
100 | axs[1,·1].set_title('Complement·of·union·graph') | 100 | axs[1,·1].set_title('Complement·of·union·graph') |
101 | plt.show() | 101 | plt.show() |
102 | [Original·graph,·Complement·graph,·Union·graph,·Complement·of·union·graph] | 102 | [Original·graph,·Complement·graph,·Union·graph,·Complement·of·union·graph] |
103 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8p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8n_\x8t_\x8._\x8p_\x8y |
106 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8c_\x8o_\x8m_\x8p_\x8l_\x8e_\x8m_\x8e_\x8n_\x8t_\x8._\x8z_\x8i_\x8p | 106 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8c_\x8o_\x8m_\x8p_\x8l_\x8e_\x8m_\x8e_\x8n_\x8t_\x8._\x8z_\x8i_\x8p |
107 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 107 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
108 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 108 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
109 | =============================================================================== | 109 | =============================================================================== |
110 | ©·Copyright·2010-2025,·The·igraph·development·team. | 110 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 167, 15 lines modified | Offset 167, 15 lines modified | ||
167 | import·igraph·and·then·call·<code·class="docutils·literal·notranslate"><span·class="pre">ig.config.load("./path/to/config/file")</span></code></p> | 167 | import·igraph·and·then·call·<code·class="docutils·literal·notranslate"><span·class="pre">ig.config.load("./path/to/config/file")</span></code></p> |
168 | </div> | 168 | </div> |
169 | <div·class="admonition·note"> | 169 | <div·class="admonition·note"> |
170 | <p·class="admonition-title">Note</p> | 170 | <p·class="admonition-title">Note</p> |
171 | <p>To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, | 171 | <p>To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, |
172 | colors,·layout·etc.)·check·out·<a·class="reference·internal"·href="visual_style.html#tutorials-visual-style"><span·class="std·std-ref">Visual·styling</span></a>.</p> | 172 | colors,·layout·etc.)·check·out·<a·class="reference·internal"·href="visual_style.html#tutorials-visual-style"><span·class="std·std-ref">Visual·styling</span></a>.</p> |
173 | </div> | 173 | </div> |
174 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·1.1 | 174 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·1.137·seconds)</p> |
175 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-configuration-py"> | 175 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-configuration-py"> |
176 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 176 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
177 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/fd14e762ea0b4a045d94e852f04372f3/configuration.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">configuration.ipynb</span></code></a></p> | 177 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/fd14e762ea0b4a045d94e852f04372f3/configuration.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">configuration.ipynb</span></code></a></p> |
178 | </div> | 178 | </div> |
179 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 179 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
180 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a69ba5812cd93160ab9839c2aeb8b3a5/configuration.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">configuration.py</span></code></a></p> | 180 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a69ba5812cd93160ab9839c2aeb8b3a5/configuration.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">configuration.py</span></code></a></p> |
181 | </div> | 181 | </div> |
Offset 78, 15 lines modified | Offset 78, 15 lines modified | ||
78 | Note | 78 | Note |
79 | You·can·have·multiple·config·files:·specify·each·location·via·ig.config.save | 79 | You·can·have·multiple·config·files:·specify·each·location·via·ig.config.save |
80 | ("./path/to/config/file").·To·load·a·specific·config,·import·igraph·and·then | 80 | ("./path/to/config/file").·To·load·a·specific·config,·import·igraph·and·then |
81 | call·ig.config.load("./path/to/config/file") | 81 | call·ig.config.load("./path/to/config/file") |
82 | Note | 82 | Note |
83 | To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes,·colors, | 83 | To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes,·colors, |
84 | layout·etc.)·check·out·_\x8V_\x8i_\x8s_\x8u_\x8a_\x8l_\x8·_\x8s_\x8t_\x8y_\x8l_\x8i_\x8n_\x8g. | 84 | layout·etc.)·check·out·_\x8V_\x8i_\x8s_\x8u_\x8a_\x8l_\x8·_\x8s_\x8t_\x8y_\x8l_\x8i_\x8n_\x8g. |
85 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8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_\x8s_\x8o_\x8u_\x8r_\x8c_\x8e_\x8·_\x8c_\x8o_\x8d_\x8e_\x8:_\x8·_\x8c_\x8o_\x8n_\x8f_\x8i_\x8g_\x8u_\x8r_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y |
88 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8c_\x8o_\x8n_\x8f_\x8i_\x8g_\x8u_\x8r_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8z_\x8i_\x8p | 88 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8c_\x8o_\x8n_\x8f_\x8i_\x8g_\x8u_\x8r_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8z_\x8i_\x8p |
89 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 89 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
90 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 90 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
91 | =============================================================================== | 91 | =============================================================================== |
92 | ©·Copyright·2010-2025,·The·igraph·development·team. | 92 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 153, 15 lines modified | Offset 153, 15 lines modified | ||
153 | </div> | 153 | </div> |
154 | <img·src="../_images/sphx_glr_connected_components_001.png"·srcset="../_images/sphx_glr_connected_components_001.png"·alt="connected·components"·class·=·"sphx-glr-single-img"/><div·class="admonition·note"> | 154 | <img·src="../_images/sphx_glr_connected_components_001.png"·srcset="../_images/sphx_glr_connected_components_001.png"·alt="connected·components"·class·=·"sphx-glr-single-img"/><div·class="admonition·note"> |
155 | <p·class="admonition-title">Note</p> | 155 | <p·class="admonition-title">Note</p> |
156 | <p>We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex | 156 | <p>We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex |
157 | colors,·since·255·in·the·<a·class="reference·external"·href="/en/latest/api/igraph.drawing.colors.RainbowPalette.html"·title="(in·igraph·v0.11.9)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">igraph.drawing.colors.RainbowPalette</span></code></a> | 157 | colors,·since·255·in·the·<a·class="reference·external"·href="/en/latest/api/igraph.drawing.colors.RainbowPalette.html"·title="(in·igraph·v0.11.9)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">igraph.drawing.colors.RainbowPalette</span></code></a> |
158 | corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues.</p> | 158 | corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues.</p> |
159 | </div> | 159 | </div> |
160 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.57 | 160 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.577·seconds)</p> |
161 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-connected-components-py"> | 161 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-connected-components-py"> |
162 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 162 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
163 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a6b592f65e45d4dc0cd800dd966e8a73/connected_components.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">connected_components.ipynb</span></code></a></p> | 163 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a6b592f65e45d4dc0cd800dd966e8a73/connected_components.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">connected_components.ipynb</span></code></a></p> |
164 | </div> | 164 | </div> |
165 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 165 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
166 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/7eae7ff0b0b32c69a5543e6ca66a80ad/connected_components.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">connected_components.py</span></code></a></p> | 166 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/7eae7ff0b0b32c69a5543e6ca66a80ad/connected_components.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">connected_components.py</span></code></a></p> |
167 | </div> | 167 | </div> |
Offset 70, 15 lines modified | Offset 70, 15 lines modified | ||
70 | ) | 70 | ) |
71 | plt.show() | 71 | plt.show() |
72 | [connected·components] | 72 | [connected·components] |
73 | Note | 73 | Note |
74 | We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex·colors, | 74 | We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex·colors, |
75 | since·255·in·the·_\x8i_\x8g_\x8r_\x8a_\x8p_\x8h_\x8._\x8d_\x8r_\x8a_\x8w_\x8i_\x8n_\x8g_\x8._\x8c_\x8o_\x8l_\x8o_\x8r_\x8s_\x8._\x8R_\x8a_\x8i_\x8n_\x8b_\x8o_\x8w_\x8P_\x8a_\x8l_\x8e_\x8t_\x8t_\x8e·corresponds·to·looping | 75 | since·255·in·the·_\x8i_\x8g_\x8r_\x8a_\x8p_\x8h_\x8._\x8d_\x8r_\x8a_\x8w_\x8i_\x8n_\x8g_\x8._\x8c_\x8o_\x8l_\x8o_\x8r_\x8s_\x8._\x8R_\x8a_\x8i_\x8n_\x8b_\x8o_\x8w_\x8P_\x8a_\x8l_\x8e_\x8t_\x8t_\x8e·corresponds·to·looping |
76 | back·to·red.·This·gives·us·nicely·distinct·hues. | 76 | back·to·red.·This·gives·us·nicely·distinct·hues. |
77 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.57 | 77 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.577·seconds) |
78 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8c_\x8o_\x8n_\x8n_\x8e_\x8c_\x8t_\x8e_\x8d_\x8__\x8c_\x8o_\x8m_\x8p_\x8o_\x8n_\x8e_\x8n_\x8t_\x8s_\x8._\x8i_\x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_\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8c_\x8o_\x8n_\x8n_\x8e_\x8c_\x8t_\x8e_\x8d_\x8__\x8c_\x8o_\x8m_\x8p_\x8o_\x8n_\x8e_\x8n_\x8t_\x8s_\x8._\x8z_\x8i_\x8p |
81 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 81 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
82 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 82 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
83 | =============================================================================== | 83 | =============================================================================== |
84 | ©·Copyright·2010-2025,·The·igraph·development·team. | 84 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 160, 15 lines modified | Offset 160, 15 lines modified | ||
160 | </div> | 160 | </div> |
161 | <p>Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some | 161 | <p>Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some |
162 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those | 162 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those |
163 | multiedges,·keeping·each·side·only·once:</p> | 163 | multiedges,·keeping·each·side·only·once:</p> |
164 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">simplify</span><span·class="p">()</span> | 164 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">simplify</span><span·class="p">()</span> |
165 | </pre></div> | 165 | </pre></div> |
166 | </div> | 166 | </div> |
167 | <div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="o"><</span><span·class="n">igraph</span><span·class="o">.</span><span·class="n">Graph</span>·<span·class="nb">object</span>·<span·class="n">at</span>·<span·class="mh">0xffff9 | 167 | <div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="o"><</span><span·class="n">igraph</span><span·class="o">.</span><span·class="n">Graph</span>·<span·class="nb">object</span>·<span·class="n">at</span>·<span·class="mh">0xffff9c11a050</span><span·class="o">></span> |
168 | </pre></div> | 168 | </pre></div> |
169 | </div> | 169 | </div> |
170 | <p>Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks | 170 | <p>Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks |
171 | like:</p> | 171 | like:</p> |
172 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">ax</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">()</span> | 172 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="n">fig</span><span·class="p">,</span>·<span·class="n">ax</span>·<span·class="o">=</span>·<span·class="n">plt</span><span·class="o">.</span><span·class="n">subplots</span><span·class="p">()</span> |
173 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span> | 173 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span> |
174 | ····<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="p">,</span> | 174 | ····<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="p">,</span> |
Offset 212, 15 lines modified | Offset 212, 15 lines modified | ||
212 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mf">0.2</span><span·class="p">,</span> | 212 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mf">0.2</span><span·class="p">,</span> |
213 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> | 213 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> |
214 | <span·class="p">)</span> | 214 | <span·class="p">)</span> |
215 | <span·class="n">ax</span><span·class="o">.</span><span·class="n">set</span><span·class="p">(</span><span·class="n">xlim</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">),</span>·<span·class="n">ylim</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">))</span> | 215 | <span·class="n">ax</span><span·class="o">.</span><span·class="n">set</span><span·class="p">(</span><span·class="n">xlim</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">),</span>·<span·class="n">ylim</span><span·class="o">=</span><span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">))</span> |
216 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 216 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
217 | </pre></div> | 217 | </pre></div> |
218 | </div> | 218 | </div> |
219 | <img·src="../_images/sphx_glr_delaunay-triangulation_002.png"·srcset="../_images/sphx_glr_delaunay-triangulation_002.png"·alt="delaunay·triangulation"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 219 | <img·src="../_images/sphx_glr_delaunay-triangulation_002.png"·srcset="../_images/sphx_glr_delaunay-triangulation_002.png"·alt="delaunay·triangulation"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.670·seconds)</p> |
220 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-delaunay-triangulation-py"> | 220 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-delaunay-triangulation-py"> |
221 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 221 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
222 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/84b5535aec2782912ca65d8fb310e523/delaunay-triangulation.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">delaunay-triangulation.ipynb</span></code></a></p> | 222 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/84b5535aec2782912ca65d8fb310e523/delaunay-triangulation.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">delaunay-triangulation.ipynb</span></code></a></p> |
223 | </div> | 223 | </div> |
224 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 224 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
225 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/e325ba6738c8eb1cffd598c9bd3b4f77/delaunay-triangulation.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">delaunay-triangulation.py</span></code></a></p> | 225 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/e325ba6738c8eb1cffd598c9bd3b4f77/delaunay-triangulation.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">delaunay-triangulation.py</span></code></a></p> |
226 | </div> | 226 | </div> |
Offset 72, 15 lines modified | Offset 72, 15 lines modified | ||
72 | ········(tri[1],·tri[2]), | 72 | ········(tri[1],·tri[2]), |
73 | ········(tri[0],·tri[2]), | 73 | ········(tri[0],·tri[2]), |
74 | ····]) | 74 | ····]) |
75 | Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some | 75 | Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some |
76 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those | 76 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those |
77 | multiedges,·keeping·each·side·only·once: | 77 | multiedges,·keeping·each·side·only·once: |
78 | _\x8g.simplify() | 78 | _\x8g.simplify() |
79 | <igraph.Graph·object·at·0xffff9 | 79 | <igraph.Graph·object·at·0xffff9c11a050> |
80 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks | 80 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks |
81 | like: | 81 | like: |
82 | fig,·ax·=·plt.subplots() | 82 | fig,·ax·=·plt.subplots() |
83 | ig.plot( | 83 | ig.plot( |
84 | ····_\x8g, | 84 | ····_\x8g, |
85 | ····_\x8l_\x8a_\x8y_\x8o_\x8u_\x8t=_\x8l_\x8a_\x8y_\x8o_\x8u_\x8t, | 85 | ····_\x8l_\x8a_\x8y_\x8o_\x8u_\x8t=_\x8l_\x8a_\x8y_\x8o_\x8u_\x8t, |
86 | ····target=ax, | 86 | ····target=ax, |
Offset 115, 15 lines modified | Offset 115, 15 lines modified | ||
115 | ····vertex_size=0, | 115 | ····vertex_size=0, |
116 | ····edge_width=0.2, | 116 | ····edge_width=0.2, |
117 | ····edge_color="white", | 117 | ····edge_color="white", |
118 | ) | 118 | ) |
119 | ax.set(xlim=(0,·1),·ylim=(0,·1)) | 119 | ax.set(xlim=(0,·1),·ylim=(0,·1)) |
120 | plt.show() | 120 | plt.show() |
121 | [delaunay·triangulation] | 121 | [delaunay·triangulation] |
122 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes· | 122 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.670·seconds) |
123 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8d_\x8e_\x8l_\x8a_\x8u_\x8n_\x8a_\x8y_\x8-_\x8t_\x8r_\x8i_\x8a_\x8n_\x8g_\x8u_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8i_\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a_\x8t_\x8i_\x8o_\x8n_\x8._\x8z_\x8i_\x8p | 125 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8d_\x8e_\x8l_\x8a_\x8u_\x8n_\x8a_\x8y_\x8-_\x8t_\x8r_\x8i_\x8a_\x8n_\x8g_\x8u_\x8l_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8z_\x8i_\x8p |
126 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 126 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
127 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 127 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
128 | =============================================================================== | 128 | =============================================================================== |
129 | ©·Copyright·2010-2025,·The·igraph·development·team. | 129 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 197, 15 lines modified | Offset 197, 15 lines modified | ||
197 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> | 197 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> |
198 | ····<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">15</span> | 198 | ····<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">15</span> |
199 | <span·class="p">)</span> | 199 | <span·class="p">)</span> |
200 | <span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_ylabel</span><span·class="p">(</span><span·class="s1">'N.·edges'</span><span·class="p">)</span> | 200 | <span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">0</span><span·class="p">]</span><span·class="o">.</span><span·class="n">set_ylabel</span><span·class="p">(</span><span·class="s1">'N.·edges'</span><span·class="p">)</span> |
201 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 201 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
202 | </pre></div> | 202 | </pre></div> |
203 | </div> | 203 | </div> |
204 | <img·src="../_images/sphx_glr_erdos_renyi_001.png"·srcset="../_images/sphx_glr_erdos_renyi_001.png"·alt="erdos·renyi"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.8 | 204 | <img·src="../_images/sphx_glr_erdos_renyi_001.png"·srcset="../_images/sphx_glr_erdos_renyi_001.png"·alt="erdos·renyi"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.891·seconds)</p> |
205 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-erdos-renyi-py"> | 205 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-erdos-renyi-py"> |
206 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 206 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
207 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/25d5caa797264a1f03d19440ae76dc03/erdos_renyi.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">erdos_renyi.ipynb</span></code></a></p> | 207 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/25d5caa797264a1f03d19440ae76dc03/erdos_renyi.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">erdos_renyi.ipynb</span></code></a></p> |
208 | </div> | 208 | </div> |
209 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 209 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
210 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b438976968d9cea7b775361a0531520c/erdos_renyi.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">erdos_renyi.py</span></code></a></p> | 210 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b438976968d9cea7b775361a0531520c/erdos_renyi.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">erdos_renyi.py</span></code></a></p> |
211 | </div> | 211 | </div> |
Offset 109, 15 lines modified | Offset 109, 15 lines modified | ||
109 | ····layout="circle", | 109 | ····layout="circle", |
110 | ····vertex_color="lightblue", | 110 | ····vertex_color="lightblue", |
111 | ····vertex_size=15 | 111 | ····vertex_size=15 |
112 | ) | 112 | ) |
113 | axs[1,·0].set_ylabel('N.·edges') | 113 | axs[1,·0].set_ylabel('N.·edges') |
114 | plt.show() | 114 | plt.show() |
115 | [erdos·renyi] | 115 | [erdos·renyi] |
116 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8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\x8o_\x8d_\x8e_\x8:_\x8·_\x8e_\x8r_\x8d_\x8o_\x8s_\x8__\x8r_\x8e_\x8n_\x8y_\x8i_\x8._\x8p_\x8y |
119 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8e_\x8r_\x8d_\x8o_\x8s_\x8__\x8r_\x8e_\x8n_\x8y_\x8i_\x8._\x8z_\x8i_\x8p | 119 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8e_\x8r_\x8d_\x8o_\x8s_\x8__\x8r_\x8e_\x8n_\x8y_\x8i_\x8._\x8z_\x8i_\x8p |
120 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 120 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
121 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 121 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
122 | =============================================================================== | 122 | =============================================================================== |
123 | ©·Copyright·2010-2025,·The·igraph·development·team. | 123 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 155, 15 lines modified | Offset 155, 15 lines modified | ||
155 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"grey"</span><span·class="p">,</span> | 155 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"grey"</span><span·class="p">,</span> |
156 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"#222"</span><span·class="p">,</span> | 156 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"#222"</span><span·class="p">,</span> |
157 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span> | 157 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span> |
158 | <span·class="p">)</span> | 158 | <span·class="p">)</span> |
159 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 159 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
160 | </pre></div> | 160 | </pre></div> |
161 | </div> | 161 | </div> |
162 | <img·src="../_images/sphx_glr_generate_dag_001.png"·srcset="../_images/sphx_glr_generate_dag_001.png"·alt="generate·dag"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 162 | <img·src="../_images/sphx_glr_generate_dag_001.png"·srcset="../_images/sphx_glr_generate_dag_001.png"·alt="generate·dag"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.504·seconds)</p> |
163 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-generate-dag-py"> | 163 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-generate-dag-py"> |
164 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 164 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
165 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b5f18d75acde9962f9eaea66530d3e8c/generate_dag.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">generate_dag.ipynb</span></code></a></p> | 165 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b5f18d75acde9962f9eaea66530d3e8c/generate_dag.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">generate_dag.ipynb</span></code></a></p> |
166 | </div> | 166 | </div> |
167 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 167 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
168 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/41b03534d9792d8dee4abf26a0ddb6df/generate_dag.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">generate_dag.py</span></code></a></p> | 168 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/41b03534d9792d8dee4abf26a0ddb6df/generate_dag.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">generate_dag.py</span></code></a></p> |
169 | </div> | 169 | </div> |
Offset 70, 15 lines modified | Offset 70, 15 lines modified | ||
70 | ····vertex_size=15, | 70 | ····vertex_size=15, |
71 | ····vertex_color="grey", | 71 | ····vertex_color="grey", |
72 | ····edge_color="#222", | 72 | ····edge_color="#222", |
73 | ····edge_width=1, | 73 | ····edge_width=1, |
74 | ) | 74 | ) |
75 | plt.show() | 75 | plt.show() |
76 | [generate·dag] | 76 | [generate·dag] |
77 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s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:_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8__\x8d_\x8a_\x8g_\x8._\x8p_\x8y |
80 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8__\x8d_\x8a_\x8g_\x8._\x8z_\x8i_\x8p | 80 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8__\x8d_\x8a_\x8g_\x8._\x8z_\x8i_\x8p |
81 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 81 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
82 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 82 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
83 | =============================================================================== | 83 | =============================================================================== |
84 | ©·Copyright·2010-2025,·The·igraph·development·team. | 84 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 189, 15 lines modified | Offset 189, 15 lines modified | ||
189 | ····<span·class="o">**</span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#dict"·title="builtins.dict"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">visual_style</span></a><span·class="p">,</span> | 189 | ····<span·class="o">**</span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#dict"·title="builtins.dict"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">visual_style</span></a><span·class="p">,</span> |
190 | <span·class="p">)</span> | 190 | <span·class="p">)</span> |
191 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">text</span><span·class="p">(</span><span·class="mf">0.38</span><span·class="p">,</span>·<span·class="mf">0.5</span><span·class="p">,</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">simeq$'</span>·<span·class="k">if</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g1</span></a><span·class="o">.</span><span·class="n">isomorphic</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a><span·class="p">)</span>·<span·class="k">else</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">neq$'</span><span·class="p">,</span>·<span·class="n">fontsize</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">,</span>·<span·class="n">ha</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">,</span>·<span·class="n">va</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">)</span> | 191 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">text</span><span·class="p">(</span><span·class="mf">0.38</span><span·class="p">,</span>·<span·class="mf">0.5</span><span·class="p">,</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">simeq$'</span>·<span·class="k">if</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g1</span></a><span·class="o">.</span><span·class="n">isomorphic</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a><span·class="p">)</span>·<span·class="k">else</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">neq$'</span><span·class="p">,</span>·<span·class="n">fontsize</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">,</span>·<span·class="n">ha</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">,</span>·<span·class="n">va</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">)</span> |
192 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">text</span><span·class="p">(</span><span·class="mf">0.65</span><span·class="p">,</span>·<span·class="mf">0.5</span><span·class="p">,</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">simeq$'</span>·<span·class="k">if</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a><span·class="o">.</span><span·class="n">isomorphic</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g3</span></a><span·class="p">)</span>·<span·class="k">else</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">neq$'</span><span·class="p">,</span>·<span·class="n">fontsize</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">,</span>·<span·class="n">ha</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">,</span>·<span·class="n">va</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">)</span> | 192 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">text</span><span·class="p">(</span><span·class="mf">0.65</span><span·class="p">,</span>·<span·class="mf">0.5</span><span·class="p">,</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">simeq$'</span>·<span·class="k">if</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a><span·class="o">.</span><span·class="n">isomorphic</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g3</span></a><span·class="p">)</span>·<span·class="k">else</span>·<span·class="s1">'$</span><span·class="se">\\</span><span·class="s1">neq$'</span><span·class="p">,</span>·<span·class="n">fontsize</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">,</span>·<span·class="n">ha</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">,</span>·<span·class="n">va</span><span·class="o">=</span><span·class="s1">'center'</span><span·class="p">)</span> |
193 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 193 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
194 | </pre></div> | 194 | </pre></div> |
195 | </div> | 195 | </div> |
196 | <img·src="../_images/sphx_glr_isomorphism_001.png"·srcset="../_images/sphx_glr_isomorphism_001.png"·alt="isomorphism"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.2 | 196 | <img·src="../_images/sphx_glr_isomorphism_001.png"·srcset="../_images/sphx_glr_isomorphism_001.png"·alt="isomorphism"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.280·seconds)</p> |
197 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-isomorphism-py"> | 197 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-isomorphism-py"> |
198 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 198 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
199 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/27a7c4b3d11014ddb5b8b2a44e30e734/isomorphism.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">isomorphism.ipynb</span></code></a></p> | 199 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/27a7c4b3d11014ddb5b8b2a44e30e734/isomorphism.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">isomorphism.ipynb</span></code></a></p> |
200 | </div> | 200 | </div> |
201 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 201 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
202 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/75f065515779d42d798e6f42e458354a/isomorphism.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">isomorphism.py</span></code></a></p> | 202 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/75f065515779d42d798e6f42e458354a/isomorphism.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">isomorphism.py</span></code></a></p> |
203 | </div> | 203 | </div> |
Offset 104, 15 lines modified | Offset 104, 15 lines modified | ||
104 | ) | 104 | ) |
105 | fig.text(0.38,·0.5,·'$\\simeq$'·if·_\x8g_\x81.isomorphic(_\x8g_\x82)·else·'$\\neq$', | 105 | fig.text(0.38,·0.5,·'$\\simeq$'·if·_\x8g_\x81.isomorphic(_\x8g_\x82)·else·'$\\neq$', |
106 | fontsize=15,·ha='center',·va='center') | 106 | fontsize=15,·ha='center',·va='center') |
107 | fig.text(0.65,·0.5,·'$\\simeq$'·if·_\x8g_\x82.isomorphic(_\x8g_\x83)·else·'$\\neq$', | 107 | fig.text(0.65,·0.5,·'$\\simeq$'·if·_\x8g_\x82.isomorphic(_\x8g_\x83)·else·'$\\neq$', |
108 | fontsize=15,·ha='center',·va='center') | 108 | fontsize=15,·ha='center',·va='center') |
109 | plt.show() | 109 | plt.show() |
110 | [isomorphism] | 110 | [isomorphism] |
111 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.2 | 111 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.280·seconds) |
112 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8i_\x8s_\x8o_\x8m_\x8o_\x8r_\x8p_\x8h_\x8i_\x8s_\x8m_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 112 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k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l_\x8e_\x8r_\x8y | 115 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
116 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 116 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
117 | =============================================================================== | 117 | =============================================================================== |
118 | ©·Copyright·2010-2025,·The·igraph·development·team. | 118 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 157, 15 lines modified | Offset 157, 15 lines modified | ||
157 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> | 157 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> |
158 | ····<span·class="n">vertex_label</span><span·class="o">=</span><span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">vcount</span><span·class="p">()),</span> | 158 | ····<span·class="n">vertex_label</span><span·class="o">=</span><span·class="nb">range</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">vcount</span><span·class="p">()),</span> |
159 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span> | 159 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span> |
160 | <span·class="p">)</span> | 160 | <span·class="p">)</span> |
161 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 161 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
162 | </pre></div> | 162 | </pre></div> |
163 | </div> | 163 | </div> |
164 | <img·src="../_images/sphx_glr_maxflow_001.png"·srcset="../_images/sphx_glr_maxflow_001.png"·alt="maxflow"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.1 | 164 | <img·src="../_images/sphx_glr_maxflow_001.png"·srcset="../_images/sphx_glr_maxflow_001.png"·alt="maxflow"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.129·seconds)</p> |
165 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-maxflow-py"> | 165 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-maxflow-py"> |
166 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 166 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
167 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/ec967e96145be835811b34f369ceb4c2/maxflow.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">maxflow.ipynb</span></code></a></p> | 167 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/ec967e96145be835811b34f369ceb4c2/maxflow.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">maxflow.ipynb</span></code></a></p> |
168 | </div> | 168 | </div> |
169 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 169 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
170 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/fb1ace091b479d9370bc8348d34bb5e6/maxflow.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">maxflow.py</span></code></a></p> | 170 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/fb1ace091b479d9370bc8348d34bb5e6/maxflow.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">maxflow.py</span></code></a></p> |
171 | </div> | 171 | </div> |
Offset 73, 15 lines modified | Offset 73, 15 lines modified | ||
73 | ····target=ax, | 73 | ····target=ax, |
74 | ····layout="circle", | 74 | ····layout="circle", |
75 | ····vertex_label=range(_\x8g.vcount()), | 75 | ····vertex_label=range(_\x8g.vcount()), |
76 | ····vertex_color="lightblue" | 76 | ····vertex_color="lightblue" |
77 | ) | 77 | ) |
78 | plt.show() | 78 | plt.show() |
79 | [maxflow] | 79 | [maxflow] |
80 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.1 | 80 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.129·seconds) |
81 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8m_\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x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 84 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
85 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 85 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
86 | =============================================================================== | 86 | =============================================================================== |
87 | ©·Copyright·2010-2025,·The·igraph·development·team. | 87 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 164, 15 lines modified | Offset 164, 15 lines modified | ||
164 | ····<span·class="n">edge_width</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"width"</span><span·class="p">],</span> | 164 | ····<span·class="n">edge_width</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"width"</span><span·class="p">],</span> |
165 | ····<span·class="n">edge_label</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"weight"</span><span·class="p">],</span> | 165 | ····<span·class="n">edge_label</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"weight"</span><span·class="p">],</span> |
166 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> | 166 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> |
167 | <span·class="p">)</span> | 167 | <span·class="p">)</span> |
168 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 168 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
169 | </pre></div> | 169 | </pre></div> |
170 | </div> | 170 | </div> |
171 | <img·src="../_images/sphx_glr_minimum_spanning_trees_001.png"·srcset="../_images/sphx_glr_minimum_spanning_trees_001.png"·alt="minimum·spanning·trees"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.35 | 171 | <img·src="../_images/sphx_glr_minimum_spanning_trees_001.png"·srcset="../_images/sphx_glr_minimum_spanning_trees_001.png"·alt="minimum·spanning·trees"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.350·seconds)</p> |
172 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-minimum-spanning-trees-py"> | 172 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-minimum-spanning-trees-py"> |
173 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 173 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
174 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d8d9437e575458785bbd8b9f92ad90ed/minimum_spanning_trees.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">minimum_spanning_trees.ipynb</span></code></a></p> | 174 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d8d9437e575458785bbd8b9f92ad90ed/minimum_spanning_trees.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">minimum_spanning_trees.ipynb</span></code></a></p> |
175 | </div> | 175 | </div> |
176 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 176 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
177 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/20634a79e0149b921e8021ba1a9bf22c/minimum_spanning_trees.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">minimum_spanning_trees.py</span></code></a></p> | 177 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/20634a79e0149b921e8021ba1a9bf22c/minimum_spanning_trees.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">minimum_spanning_trees.py</span></code></a></p> |
178 | </div> | 178 | </div> |
Offset 78, 15 lines modified | Offset 78, 15 lines modified | ||
78 | ····vertex_color="lightblue", | 78 | ····vertex_color="lightblue", |
79 | ····edge_width=_\x8g_\x8._\x8e_\x8s["width"], | 79 | ····edge_width=_\x8g_\x8._\x8e_\x8s["width"], |
80 | ····edge_label=_\x8g_\x8._\x8e_\x8s["weight"], | 80 | ····edge_label=_\x8g_\x8._\x8e_\x8s["weight"], |
81 | ····edge_background="white", | 81 | ····edge_background="white", |
82 | ) | 82 | ) |
83 | plt.show() | 83 | plt.show() |
84 | [minimum·spanning·trees] | 84 | [minimum·spanning·trees] |
85 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.35 | 85 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.350·seconds) |
86 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8m_\x8i_\x8n_\x8i_\x8m_\x8u_\x8m_\x8__\x8s_\x8p_\x8a_\x8n_\x8n_\x8i_\x8n_\x8g_\x8__\x8t_\x8r_\x8e_\x8e_\x8s_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 86 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8m_\x8i_\x8n_\x8i_\x8m_\x8u_\x8m_\x8__\x8s_\x8p_\x8a_\x8n_\x8n_\x8i_\x8n_\x8g_\x8__\x8t_\x8r_\x8e_\x8e_\x8s_\x8._\x8i_\x8p_\x8y_\x8n_\x8b |
87 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8P_\x8y_\x8t_\x8h_\x8o_\x8n_\x8·_\x8s_\x8o_\x8u_\x8r_\x8c_\x8e_\x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l_\x8e_\x8r_\x8y | 89 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
90 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 90 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
91 | =============================================================================== | 91 | =============================================================================== |
92 | ©·Copyright·2010-2025,·The·igraph·development·team. | 92 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 213, 15 lines modified | Offset 213, 15 lines modified | ||
213 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> | 213 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> |
214 | ····<a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">vertex_size</span></a><span·class="o">=</span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">vertex_size</span></a><span·class="p">,</span> | 214 | ····<a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">vertex_size</span></a><span·class="o">=</span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">vertex_size</span></a><span·class="p">,</span> |
215 | ····<span·class="n">edge_width</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"weight"</span><span·class="p">],</span> | 215 | ····<span·class="n">edge_width</span><span·class="o">=</span><a·href="/en/latest/api/igraph.Graph.html#es"·title="igraph.Graph.es"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-attribute"><span·class="n">g</span><span·class="o">.</span><span·class="n">es</span></a><span·class="p">[</span><span·class="s2">"weight"</span><span·class="p">],</span> |
216 | <span·class="p">)</span> | 216 | <span·class="p">)</span> |
217 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 217 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
218 | </pre></div> | 218 | </pre></div> |
219 | </div> | 219 | </div> |
220 | <img·src="../_images/sphx_glr_online_user_actions_002.png"·srcset="../_images/sphx_glr_online_user_actions_002.png"·alt="online·user·actions"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 220 | <img·src="../_images/sphx_glr_online_user_actions_002.png"·srcset="../_images/sphx_glr_online_user_actions_002.png"·alt="online·user·actions"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.548·seconds)</p> |
221 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-online-user-actions-py"> | 221 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-online-user-actions-py"> |
222 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 222 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
223 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/937b9a86f4f37eae9f32f34396051b1f/online_user_actions.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">online_user_actions.ipynb</span></code></a></p> | 223 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/937b9a86f4f37eae9f32f34396051b1f/online_user_actions.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">online_user_actions.ipynb</span></code></a></p> |
224 | </div> | 224 | </div> |
225 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 225 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
226 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d26d373ee3cda71ff9571e6ac3291311/online_user_actions.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">online_user_actions.py</span></code></a></p> | 226 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d26d373ee3cda71ff9571e6ac3291311/online_user_actions.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">online_user_actions.py</span></code></a></p> |
227 | </div> | 227 | </div> |
Offset 125, 15 lines modified | Offset 125, 15 lines modified | ||
125 | ····vertex_label=_\x8g_\x8._\x8v_\x8s['name'], | 125 | ····vertex_label=_\x8g_\x8._\x8v_\x8s['name'], |
126 | ····vertex_color="lightblue", | 126 | ····vertex_color="lightblue", |
127 | ····_\x8v_\x8e_\x8r_\x8t_\x8e_\x8x_\x8__\x8s_\x8i_\x8z_\x8e=_\x8v_\x8e_\x8r_\x8t_\x8e_\x8x_\x8__\x8s_\x8i_\x8z_\x8e, | 127 | ····_\x8v_\x8e_\x8r_\x8t_\x8e_\x8x_\x8__\x8s_\x8i_\x8z_\x8e=_\x8v_\x8e_\x8r_\x8t_\x8e_\x8x_\x8__\x8s_\x8i_\x8z_\x8e, |
128 | ····edge_width=_\x8g_\x8._\x8e_\x8s["weight"], | 128 | ····edge_width=_\x8g_\x8._\x8e_\x8s["weight"], |
129 | ) | 129 | ) |
130 | plt.show() | 130 | plt.show() |
131 | [online·user·actions] | 131 | [online·user·actions] |
132 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0. | 132 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.548·seconds) |
133 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8o_\x8n_\x8l_\x8i_\x8n_\x8e_\x8__\x8u_\x8s_\x8e_\x8r_\x8__\x8a_\x8c_\x8t_\x8i_\x8o_\x8n_\x8s_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 133 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8o_\x8n_\x8l_\x8i_\x8n_\x8e_\x8__\x8u_\x8s_\x8e_\x8r_\x8__\x8a_\x8c_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8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 136 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
137 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 137 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
138 | =============================================================================== | 138 | =============================================================================== |
139 | ©·Copyright·2010-2025,·The·igraph·development·team. | 139 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 200, 15 lines modified | Offset 200, 15 lines modified | ||
200 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">personalized_page_rank</span></a>·<span·class="o">=</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">personalized_pagerank</span><span·class="p">(</span><span·class="n">damping</span><span·class="o">=</span><span·class="mf">0.45</span><span·class="p">,</span>·<span·class="n">reset</span><span·class="o">=</span><span·class="n">reset_vector</span><span·class="p">)</span> | 200 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">personalized_page_rank</span></a>·<span·class="o">=</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">personalized_pagerank</span><span·class="p">(</span><span·class="n">damping</span><span·class="o">=</span><span·class="mf">0.45</span><span·class="p">,</span>·<span·class="n">reset</span><span·class="o">=</span><span·class="n">reset_vector</span><span·class="p">)</span> |
201 | </pre></div> | 201 | </pre></div> |
202 | </div> | 202 | </div> |
203 | <p>Here·we·can·see·the·same·plot·with·the·new·damping·parameter:</p> | 203 | <p>Here·we·can·see·the·same·plot·with·the·new·damping·parameter:</p> |
204 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="n">plot_pagerank</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="p">,</span>·<a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">personalized_page_rank</span></a><span·class="p">)</span> | 204 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="n">plot_pagerank</span><span·class="p">(</span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="p">,</span>·<a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#list"·title="builtins.list"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">personalized_page_rank</span></a><span·class="p">)</span> |
205 | </pre></div> | 205 | </pre></div> |
206 | </div> | 206 | </div> |
207 | <img·src="../_images/sphx_glr_personalized_pagerank_002.png"·srcset="../_images/sphx_glr_personalized_pagerank_002.png"·alt="Graph·with·Personalized·PageRank"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.7 | 207 | <img·src="../_images/sphx_glr_personalized_pagerank_002.png"·srcset="../_images/sphx_glr_personalized_pagerank_002.png"·alt="Graph·with·Personalized·PageRank"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.715·seconds)</p> |
208 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-personalized-pagerank-py"> | 208 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-personalized-pagerank-py"> |
209 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 209 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
210 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/78b4882e8c0fb1c9765566fa9ed17a5d/personalized_pagerank.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">personalized_pagerank.ipynb</span></code></a></p> | 210 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/78b4882e8c0fb1c9765566fa9ed17a5d/personalized_pagerank.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">personalized_pagerank.ipynb</span></code></a></p> |
211 | </div> | 211 | </div> |
212 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 212 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
213 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/54c746523a0a60b918afe1f92920d296/personalized_pagerank.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">personalized_pagerank.py</span></code></a></p> | 213 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/54c746523a0a60b918afe1f92920d296/personalized_pagerank.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">personalized_pagerank.py</span></code></a></p> |
214 | </div> | 214 | </div> |
Offset 115, 15 lines modified | Offset 115, 15 lines modified | ||
115 | [Graph·with·Personalized·PageRank] | 115 | [Graph·with·Personalized·PageRank] |
116 | Alternatively,·we·can·play·around·with·the·damping·parameter: | 116 | Alternatively,·we·can·play·around·with·the·damping·parameter: |
117 | _\x8p_\x8e_\x8r_\x8s_\x8o_\x8n_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8g_\x8e_\x8__\x8r_\x8a_\x8n_\x8k·=·_\x8g.personalized_pagerank(damping=0.45, | 117 | _\x8p_\x8e_\x8r_\x8s_\x8o_\x8n_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8g_\x8e_\x8__\x8r_\x8a_\x8n_\x8k·=·_\x8g.personalized_pagerank(damping=0.45, |
118 | reset=reset_vector) | 118 | reset=reset_vector) |
119 | Here·we·can·see·the·same·plot·with·the·new·damping·parameter: | 119 | Here·we·can·see·the·same·plot·with·the·new·damping·parameter: |
120 | plot_pagerank(_\x8g,·_\x8p_\x8e_\x8r_\x8s_\x8o_\x8n_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8g_\x8e_\x8__\x8r_\x8a_\x8n_\x8k) | 120 | plot_pagerank(_\x8g,·_\x8p_\x8e_\x8r_\x8s_\x8o_\x8n_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8g_\x8e_\x8__\x8r_\x8a_\x8n_\x8k) |
121 | [Graph·with·Personalized·PageRank] | 121 | [Graph·with·Personalized·PageRank] |
122 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.7 | 122 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.715·seconds) |
123 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8p_\x8e_\x8r_\x8s_\x8o_\x8n_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8g_\x8e_\x8r_\x8a_\x8n_\x8k_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 123 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8p_\x8e_\x8r_\x8s_\x8o_\x8n_\x8a_\x8l_\x8i_\x8z_\x8e_\x8d_\x8__\x8p_\x8a_\x8g_\x8e_\x8r_\x8a_\x8n_\x8k_\x8._\x8i_\x8p_\x8y_\x8n_\x8b |
124 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8P_\x8y_\x8t_\x8h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x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 126 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
127 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 127 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
128 | =============================================================================== | 128 | =============================================================================== |
129 | ©·Copyright·2010-2025,·The·igraph·development·team. | 129 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 179, 15 lines modified | Offset 179, 15 lines modified | ||
179 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">savefig</span><span·class="p">(</span><span·class="s1">'social_network.pdf'</span><span·class="p">)</span> | 179 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">savefig</span><span·class="p">(</span><span·class="s1">'social_network.pdf'</span><span·class="p">)</span> |
180 | <span·class="c1">#·Export·and·import·a·graph·as·a·GML·file.</span> | 180 | <span·class="c1">#·Export·and·import·a·graph·as·a·GML·file.</span> |
181 | <a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">save</span><span·class="p">(</span><span·class="s2">"social_network.gml"</span><span·class="p">)</span> | 181 | <a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a><span·class="o">.</span><span·class="n">save</span><span·class="p">(</span><span·class="s2">"social_network.gml"</span><span·class="p">)</span> |
182 | <a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a>·<span·class="o">=</span>·<span·class="n">ig</span><span·class="o">.</span><span·class="n">load</span><span·class="p">(</span><span·class="s2">"social_network.gml"</span><span·class="p">)</span> | 182 | <a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g</span></a>·<span·class="o">=</span>·<span·class="n">ig</span><span·class="o">.</span><span·class="n">load</span><span·class="p">(</span><span·class="s2">"social_network.gml"</span><span·class="p">)</span> |
183 | </pre></div> | 183 | </pre></div> |
184 | </div> | 184 | </div> |
185 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 185 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.286·seconds)</p> |
186 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-quickstart-py"> | 186 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-quickstart-py"> |
187 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 187 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
188 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/672969cb8d7b3403ac7a48137cd865ba/quickstart.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">quickstart.ipynb</span></code></a></p> | 188 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/672969cb8d7b3403ac7a48137cd865ba/quickstart.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">quickstart.ipynb</span></code></a></p> |
189 | </div> | 189 | </div> |
190 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 190 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
191 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a526f4c21167c30e565f6eef2922968a/quickstart.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">quickstart.py</span></code></a></p> | 191 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a526f4c21167c30e565f6eef2922968a/quickstart.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">quickstart.py</span></code></a></p> |
192 | </div> | 192 | </div> |
Offset 103, 15 lines modified | Offset 103, 15 lines modified | ||
103 | fig.savefig('social_network.png') | 103 | fig.savefig('social_network.png') |
104 | fig.savefig('social_network.jpg') | 104 | fig.savefig('social_network.jpg') |
105 | fig.savefig('social_network.pdf') | 105 | fig.savefig('social_network.pdf') |
106 | #·Export·and·import·a·graph·as·a·GML·file. | 106 | #·Export·and·import·a·graph·as·a·GML·file. |
107 | _\x8g.save("social_network.gml") | 107 | _\x8g.save("social_network.gml") |
108 | _\x8g·=·ig.load("social_network.gml") | 108 | _\x8g·=·ig.load("social_network.gml") |
109 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0. | 109 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t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x8t_\x8._\x8z_\x8i_\x8p | 112 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8q_\x8u_\x8i_\x8c_\x8k_\x8s_\x8t_\x8a_\x8r_\x8t_\x8._\x8z_\x8i_\x8p |
113 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 113 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
114 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 114 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
115 | =============================================================================== | 115 | =============================================================================== |
116 | ©·Copyright·2010-2025,·The·igraph·development·team. | 116 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 372, 62 lines modified | Offset 372, 62 lines modified | ||
372 | .anim-state·input·{ | 372 | .anim-state·input·{ |
373 | ····margin:·0; | 373 | ····margin:·0; |
374 | ····vertical-align:·middle; | 374 | ····vertical-align:·middle; |
375 | } | 375 | } |
376 | </style> | 376 | </style> |
377 | <div·class="animation"> | 377 | <div·class="animation"> |
378 | ··<img·id="_anim_img | 378 | ··<img·id="_anim_imgfacc3faa0a6c42b992b25436ab4155f0"> |
379 | ··<div·class="anim-controls"> | 379 | ··<div·class="anim-controls"> |
380 | ····<input·id="_anim_slider | 380 | ····<input·id="_anim_sliderfacc3faa0a6c42b992b25436ab4155f0"·type="range"·class="anim-slider" |
381 | ···········name="points"·min="0"·max="1"·step="1"·value="0" | 381 | ···········name="points"·min="0"·max="1"·step="1"·value="0" |
382 | ···········oninput="anim | 382 | ···········oninput="animfacc3faa0a6c42b992b25436ab4155f0.set_frame(parseInt(this.value));"> |
383 | ····<div·class="anim-buttons"> | 383 | ····<div·class="anim-buttons"> |
384 | ······<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="anim | 384 | ······<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.slower()"> |
385 | ··········<i·class="fa·fa-minus"></i></button> | 385 | ··········<i·class="fa·fa-minus"></i></button> |
386 | ······<button·title="First·frame"·aria-label="First·frame"·onclick="anim | 386 | ······<button·title="First·frame"·aria-label="First·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.first_frame()"> |
387 | ········<i·class="fa·fa-fast-backward"></i></button> | 387 | ········<i·class="fa·fa-fast-backward"></i></button> |
388 | ······<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="anim | 388 | ······<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.previous_frame()"> |
389 | ··········<i·class="fa·fa-step-backward"></i></button> | 389 | ··········<i·class="fa·fa-step-backward"></i></button> |
390 | ······<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="anim | 390 | ······<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.reverse_animation()"> |
391 | ··········<i·class="fa·fa-play·fa-flip-horizontal"></i></button> | 391 | ··········<i·class="fa·fa-play·fa-flip-horizontal"></i></button> |
392 | ······<button·title="Pause"·aria-label="Pause"·onclick="anim | 392 | ······<button·title="Pause"·aria-label="Pause"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.pause_animation()"> |
393 | ··········<i·class="fa·fa-pause"></i></button> | 393 | ··········<i·class="fa·fa-pause"></i></button> |
394 | ······<button·title="Play"·aria-label="Play"·onclick="anim | 394 | ······<button·title="Play"·aria-label="Play"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.play_animation()"> |
395 | ··········<i·class="fa·fa-play"></i></button> | 395 | ··········<i·class="fa·fa-play"></i></button> |
396 | ······<button·title="Next·frame"·aria-label="Next·frame"·onclick="anim | 396 | ······<button·title="Next·frame"·aria-label="Next·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.next_frame()"> |
397 | ··········<i·class="fa·fa-step-forward"></i></button> | 397 | ··········<i·class="fa·fa-step-forward"></i></button> |
398 | ······<button·title="Last·frame"·aria-label="Last·frame"·onclick="anim | 398 | ······<button·title="Last·frame"·aria-label="Last·frame"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.last_frame()"> |
399 | ··········<i·class="fa·fa-fast-forward"></i></button> | 399 | ··········<i·class="fa·fa-fast-forward"></i></button> |
400 | ······<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="anim | 400 | ······<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="animfacc3faa0a6c42b992b25436ab4155f0.faster()"> |
401 | ··········<i·class="fa·fa-plus"></i></button> | 401 | ··········<i·class="fa·fa-plus"></i></button> |
402 | ····</div> | 402 | ····</div> |
403 | ····<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_select | 403 | ····<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_selectfacc3faa0a6c42b992b25436ab4155f0" |
404 | ··········class="anim-state"> | 404 | ··········class="anim-state"> |
405 | ······<input·type="radio"·name="state"·value="once"·id="_anim_radio1_ | 405 | ······<input·type="radio"·name="state"·value="once"·id="_anim_radio1_facc3faa0a6c42b992b25436ab4155f0" |
406 | ·············> | 406 | ·············> |
407 | ······<label·for="_anim_radio1_ | 407 | ······<label·for="_anim_radio1_facc3faa0a6c42b992b25436ab4155f0">Once</label> |
408 | ······<input·type="radio"·name="state"·value="loop"·id="_anim_radio2_ | 408 | ······<input·type="radio"·name="state"·value="loop"·id="_anim_radio2_facc3faa0a6c42b992b25436ab4155f0" |
409 | ·············checked> | 409 | ·············checked> |
410 | ······<label·for="_anim_radio2_ | 410 | ······<label·for="_anim_radio2_facc3faa0a6c42b992b25436ab4155f0">Loop</label> |
411 | ······<input·type="radio"·name="state"·value="reflect"·id="_anim_radio3_ | 411 | ······<input·type="radio"·name="state"·value="reflect"·id="_anim_radio3_facc3faa0a6c42b992b25436ab4155f0" |
412 | ·············> | 412 | ·············> |
413 | ······<label·for="_anim_radio3_ | 413 | ······<label·for="_anim_radio3_facc3faa0a6c42b992b25436ab4155f0">Reflect</label> |
414 | ····</form> | 414 | ····</form> |
415 | ··</div> | 415 | ··</div> |
416 | </div> | 416 | </div> |
417 | <script·language="javascript"> | 417 | <script·language="javascript"> |
418 | ··/*·Instantiate·the·Animation·class.·*/ | 418 | ··/*·Instantiate·the·Animation·class.·*/ |
419 | ··/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ | 419 | ··/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ |
420 | ··(function()·{ | 420 | ··(function()·{ |
421 | ····var·img_id·=·"_anim_imge21c09fd3d594f3dafc0db417e1ded06"; | ||
422 | ····var·slider_id·=·"_anim_slidere21c09fd3d594f3dafc0db417e1ded06"; | ||
423 | ····var· | 421 | ····var·img_id·=·"_anim_imgfacc3faa0a6c42b992b25436ab4155f0"; |
422 | ····var·slider_id·=·"_anim_sliderfacc3faa0a6c42b992b25436ab4155f0"; | ||
423 | ····var·loop_select_id·=·"_anim_loop_selectfacc3faa0a6c42b992b25436ab4155f0"; | ||
424 | ····var·frames·=·new·Array(12); | 424 | ····var·frames·=·new·Array(12); |
425 | ··frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ | 425 | ··frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ |
426 | bGliIHZlcnNpb24zLjEwLjErZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvzRIYmAAAAAlw\ | 426 | bGliIHZlcnNpb24zLjEwLjErZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvzRIYmAAAAAlw\ |
427 | SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ | 427 | SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ |
428 | MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ | 428 | MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ |
429 | CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ | 429 | CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ |
Offset 2954, 29 lines modified | Offset 2954, 29 lines modified | ||
2954 | GQIgAACAyRAAAQAATOb/AE4FOoe2jc3oAAAAAElFTkSuQmCC\ | 2954 | GQIgAACAyRAAAQAATOb/AE4FOoe2jc3oAAAAAElFTkSuQmCC\ |
2955 | " | 2955 | " |
2956 | ····/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before | 2956 | ····/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before |
2957 | ·······the·object·is·initialized.·*/ | 2957 | ·······the·object·is·initialized.·*/ |
2958 | ····setTimeout(function()·{ | 2958 | ····setTimeout(function()·{ |
2959 | ········anim | 2959 | ········animfacc3faa0a6c42b992b25436ab4155f0·=·new·Animation(frames,·img_id,·slider_id,·500.0, |
2960 | ·································loop_select_id); | 2960 | ·································loop_select_id); |
2961 | ····},·0); | 2961 | ····},·0); |
2962 | ··})() | 2962 | ··})() |
2963 | </script></div> | 2963 | </script></div> |
2964 | <div·class="admonition·note"> | 2964 | <div·class="admonition·note"> |
2965 | <p·class="admonition-title">Note</p> | 2965 | <p·class="admonition-title">Note</p> |
2966 | <p>We·use·<em>igraph</em>’s·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Graph.subgraph()</span></code>·(see | 2966 | <p>We·use·<em>igraph</em>’s·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Graph.subgraph()</span></code>·(see |
2967 | <a·class="reference·external"·href="/en/latest/api/igraph.GraphBase.html#induced_subgraph"·title="(in·igraph·v0.11.9)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">igraph.GraphBase.induced_subgraph()</span></code></a>)·in·order·to·obtain·a·section·of | 2967 | <a·class="reference·external"·href="/en/latest/api/igraph.GraphBase.html#induced_subgraph"·title="(in·igraph·v0.11.9)"><code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">igraph.GraphBase.induced_subgraph()</span></code></a>)·in·order·to·obtain·a·section·of |
2968 | the·ring·graph·at·a·time·for·each·frame.·While·sufficient·for·an·easy | 2968 | the·ring·graph·at·a·time·for·each·frame.·While·sufficient·for·an·easy |
2969 | example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient | 2969 | example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient |
2970 | approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn | 2970 | approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn |
2971 | the·combination·of·igraph·and·matplotlib.</p> | 2971 | the·combination·of·igraph·and·matplotlib.</p> |
2972 | </div> | 2972 | </div> |
2973 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 2973 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·2.292·seconds)</p> |
2974 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-ring-animation-py"> | 2974 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-ring-animation-py"> |
2975 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 2975 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
2976 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/7ec5e2ec78927c7b822c2d4846cf9fe5/ring_animation.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">ring_animation.ipynb</span></code></a></p> | 2976 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/7ec5e2ec78927c7b822c2d4846cf9fe5/ring_animation.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">ring_animation.ipynb</span></code></a></p> |
2977 | </div> | 2977 | </div> |
2978 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 2978 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
2979 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/04f31f979c8d03b5834fe70d27653f19/ring_animation.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">ring_animation.py</span></code></a></p> | 2979 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/04f31f979c8d03b5834fe70d27653f19/ring_animation.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">ring_animation.py</span></code></a></p> |
2980 | </div> | 2980 | </div> |
Offset 109, 15 lines modified | Offset 109, 15 lines modified | ||
109 | oOnce·#Loop·oReflect | 109 | oOnce·#Loop·oReflect |
110 | Note | 110 | Note |
111 | We·use·i\x8ig\x8gr\x8ra\x8ap\x8ph\x8h’s·Graph.subgraph()·(see·_\x8i_\x8g_\x8r_\x8a_\x8p_\x8h_\x8._\x8G_\x8r_\x8a_\x8p_\x8h_\x8B_\x8a_\x8s_\x8e_\x8._\x8i_\x8n_\x8d_\x8u_\x8c_\x8e_\x8d_\x8__\x8s_\x8u_\x8b_\x8g_\x8r_\x8a_\x8p_\x8h_\x8(_\x8))·in | 111 | We·use·i\x8ig\x8gr\x8ra\x8ap\x8ph\x8h’s·Graph.subgraph()·(see·_\x8i_\x8g_\x8r_\x8a_\x8p_\x8h_\x8._\x8G_\x8r_\x8a_\x8p_\x8h_\x8B_\x8a_\x8s_\x8e_\x8._\x8i_\x8n_\x8d_\x8u_\x8c_\x8e_\x8d_\x8__\x8s_\x8u_\x8b_\x8g_\x8r_\x8a_\x8p_\x8h_\x8(_\x8))·in |
112 | order·to·obtain·a·section·of·the·ring·graph·at·a·time·for·each·frame.·While | 112 | order·to·obtain·a·section·of·the·ring·graph·at·a·time·for·each·frame.·While |
113 | sufficient·for·an·easy·example,·this·approach·is·not·very·efficient.·Thinking | 113 | sufficient·for·an·easy·example,·this·approach·is·not·very·efficient.·Thinking |
114 | of·more·efficient·approaches,·e.g.·vertices·with·zero·radius,·is·a·useful | 114 | of·more·efficient·approaches,·e.g.·vertices·with·zero·radius,·is·a·useful |
115 | exercise·to·learn·the·combination·of·igraph·and·matplotlib. | 115 | exercise·to·learn·the·combination·of·igraph·and·matplotlib. |
116 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x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r_\x8c_\x8e_\x8·_\x8c_\x8o_\x8d_\x8e_\x8:_\x8·_\x8r_\x8i_\x8n_\x8g_\x8__\x8a_\x8n_\x8i_\x8m_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8p_\x8y |
119 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8r_\x8i_\x8n_\x8g_\x8__\x8a_\x8n_\x8i_\x8m_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8z_\x8i_\x8p | 119 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8z_\x8i_\x8p_\x8p_\x8e_\x8d_\x8:_\x8·_\x8r_\x8i_\x8n_\x8g_\x8__\x8a_\x8n_\x8i_\x8m_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8z_\x8i_\x8p |
120 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 120 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
121 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 121 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
122 | =============================================================================== | 122 | =============================================================================== |
123 | ©·Copyright·2010-2025,·The·igraph·development·team. | 123 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 196, 15 lines modified | Offset 196, 15 lines modified | ||
196 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s1">'#666'</span><span·class="p">,</span> | 196 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s1">'#666'</span><span·class="p">,</span> |
197 | ····<span·class="n">edge_align_label</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span> | 197 | ····<span·class="n">edge_align_label</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span> |
198 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s1">'white'</span> | 198 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s1">'white'</span> |
199 | <span·class="p">)</span> | 199 | <span·class="p">)</span> |
200 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 200 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
201 | </pre></div> | 201 | </pre></div> |
202 | </div> | 202 | </div> |
203 | <img·src="../_images/sphx_glr_shortest_path_visualisation_001.png"·srcset="../_images/sphx_glr_shortest_path_visualisation_001.png"·alt="shortest·path·visualisation"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 203 | <img·src="../_images/sphx_glr_shortest_path_visualisation_001.png"·srcset="../_images/sphx_glr_shortest_path_visualisation_001.png"·alt="shortest·path·visualisation"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.111·seconds)</p> |
204 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-shortest-path-visualisation-py"> | 204 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-shortest-path-visualisation-py"> |
205 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 205 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
206 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/fc60c4dc9531cdc1484f5e3ce96ab8fc/shortest_path_visualisation.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">shortest_path_visualisation.ipynb</span></code></a></p> | 206 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/fc60c4dc9531cdc1484f5e3ce96ab8fc/shortest_path_visualisation.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">shortest_path_visualisation.ipynb</span></code></a></p> |
207 | </div> | 207 | </div> |
208 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 208 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
209 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/79e1b300289994ce5ae78e692fa16ddb/shortest_path_visualisation.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">shortest_path_visualisation.py</span></code></a></p> | 209 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/79e1b300289994ce5ae78e692fa16ddb/shortest_path_visualisation.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">shortest_path_visualisation.py</span></code></a></p> |
210 | </div> | 210 | </div> |
Offset 107, 15 lines modified | Offset 107, 15 lines modified | ||
107 | ····edge_label=_\x8g_\x8._\x8e_\x8s["weight"], | 107 | ····edge_label=_\x8g_\x8._\x8e_\x8s["weight"], |
108 | ····edge_color='#666', | 108 | ····edge_color='#666', |
109 | ····edge_align_label=True, | 109 | ····edge_align_label=True, |
110 | ····edge_background='white' | 110 | ····edge_background='white' |
111 | ) | 111 | ) |
112 | plt.show() | 112 | plt.show() |
113 | [shortest·path·visualisation] | 113 | [shortest·path·visualisation] |
114 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0. | 114 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.111·seconds) |
115 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8s_\x8h_\x8o_\x8r_\x8t_\x8e_\x8s_\x8t_\x8__\x8p_\x8a_\x8t_\x8h_\x8__\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8i_\x8s_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 115 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8s_\x8h_\x8o_\x8r_\x8t_\x8e_\x8s_\x8t_\x8__\x8p_\x8a_\x8t_\x8h_\x8__\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8i_\x8s_\x8a_\x8t_\x8i_\x8o_\x8n_\x8._\x8i_\x8p_\x8y_\x8n_\x8b |
116 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8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n_\x8._\x8z_\x8i_\x8p |
118 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 118 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
119 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 119 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
120 | =============================================================================== | 120 | =============================================================================== |
121 | ©·Copyright·2010-2025,·The·igraph·development·team. | 121 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 147, 15 lines modified | Offset 147, 15 lines modified | ||
147 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a | 147 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a |
148 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph | 148 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph |
149 | untouched:</p> | 149 | untouched:</p> |
150 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a>·<span·class="o">=</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g1</span></a><span·class="o">.</span><span·class="n">copy</span><span·class="p">()</span> | 150 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a>·<span·class="o">=</span>·<a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g1</span></a><span·class="o">.</span><span·class="n">copy</span><span·class="p">()</span> |
151 | <a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a><span·class="o">.</span><span·class="n">simplify</span><span·class="p">()</span> | 151 | <a·href="/en/latest/api/igraph.Graph.html"·title="igraph.Graph"·class="sphx-glr-backref-module-igraph·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">g2</span></a><span·class="o">.</span><span·class="n">simplify</span><span·class="p">()</span> |
152 | </pre></div> | 152 | </pre></div> |
153 | </div> | 153 | </div> |
154 | <div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="o"><</span><span·class="n">igraph</span><span·class="o">.</span><span·class="n">Graph</span>·<span·class="nb">object</span>·<span·class="n">at</span>·<span·class="mh">0xffff | 154 | <div·class="sphx-glr-script-out·doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="o"><</span><span·class="n">igraph</span><span·class="o">.</span><span·class="n">Graph</span>·<span·class="nb">object</span>·<span·class="n">at</span>·<span·class="mh">0xffff99271050</span><span·class="o">></span> |
155 | </pre></div> | 155 | </pre></div> |
156 | </div> | 156 | </div> |
157 | <p>We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s | 157 | <p>We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s |
158 | choose·a·consistent·visual·style:</p> | 158 | choose·a·consistent·visual·style:</p> |
159 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#dict"·title="builtins.dict"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">visual_style</span></a>·<span·class="o">=</span>·<span·class="p">{</span> | 159 | <div·class="doctest·highlight-default·notranslate"><div·class="highlight"><pre><span></span><a·href="file:///usr/share/doc/python3-doc/html/library/stdtypes.html#dict"·title="builtins.dict"·class="sphx-glr-backref-module-builtins·sphx-glr-backref-type-py-class·sphx-glr-backref-instance"><span·class="n">visual_style</span></a>·<span·class="o">=</span>·<span·class="p">{</span> |
160 | ····<span·class="s2">"vertex_color"</span><span·class="p">:</span>·<span·class="s2">"lightblue"</span><span·class="p">,</span> | 160 | ····<span·class="s2">"vertex_color"</span><span·class="p">:</span>·<span·class="s2">"lightblue"</span><span·class="p">,</span> |
161 | ····<span·class="s2">"vertex_size"</span><span·class="p">:</span>·<span·class="mi">20</span><span·class="p">,</span> | 161 | ····<span·class="s2">"vertex_size"</span><span·class="p">:</span>·<span·class="mi">20</span><span·class="p">,</span> |
Offset 186, 15 lines modified | Offset 186, 15 lines modified | ||
186 | ····<span·class="p">))</span> | 186 | ····<span·class="p">))</span> |
187 | <span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">add_patch</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">Rectangle</span><span·class="p">(</span> | 187 | <span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">add_patch</span><span·class="p">(</span><span·class="n">plt</span><span·class="o">.</span><span·class="n">Rectangle</span><span·class="p">(</span> |
188 | ····<span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">0</span><span·class="p">),</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="n">fc</span><span·class="o">=</span><span·class="s1">'none'</span><span·class="p">,</span>·<span·class="n">ec</span><span·class="o">=</span><span·class="s1">'k'</span><span·class="p">,</span>·<span·class="n">lw</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="n">transform</span><span·class="o">=</span><span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">transAxes</span><span·class="p">,</span> | 188 | ····<span·class="p">(</span><span·class="mi">0</span><span·class="p">,</span>·<span·class="mi">0</span><span·class="p">),</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="mi">1</span><span·class="p">,</span>·<span·class="n">fc</span><span·class="o">=</span><span·class="s1">'none'</span><span·class="p">,</span>·<span·class="n">ec</span><span·class="o">=</span><span·class="s1">'k'</span><span·class="p">,</span>·<span·class="n">lw</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">,</span>·<span·class="n">transform</span><span·class="o">=</span><span·class="n">axs</span><span·class="p">[</span><span·class="mi">1</span><span·class="p">]</span><span·class="o">.</span><span·class="n">transAxes</span><span·class="p">,</span> |
189 | ····<span·class="p">))</span> | 189 | ····<span·class="p">))</span> |
190 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 190 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
191 | </pre></div> | 191 | </pre></div> |
192 | </div> | 192 | </div> |
193 | <img·src="../_images/sphx_glr_simplify_001.png"·srcset="../_images/sphx_glr_simplify_001.png"·alt="Multigraph...,·...simplified"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 193 | <img·src="../_images/sphx_glr_simplify_001.png"·srcset="../_images/sphx_glr_simplify_001.png"·alt="Multigraph...,·...simplified"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.269·seconds)</p> |
194 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-simplify-py"> | 194 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-simplify-py"> |
195 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 195 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
196 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/54476cc5a7944a895c863c973e50cf77/simplify.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">simplify.ipynb</span></code></a></p> | 196 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/54476cc5a7944a895c863c973e50cf77/simplify.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">simplify.ipynb</span></code></a></p> |
197 | </div> | 197 | </div> |
198 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 198 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
199 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/df86bcfbbf6e084c64304a7c77e115b8/simplify.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">simplify.py</span></code></a></p> | 199 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/df86bcfbbf6e084c64304a7c77e115b8/simplify.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">simplify.py</span></code></a></p> |
200 | </div> | 200 | </div> |
Offset 66, 15 lines modified | Offset 66, 15 lines modified | ||
66 | ) | 66 | ) |
67 | To·simplify·the·graph,·we·must·remember·that·the·function·operates·in·place, | 67 | To·simplify·the·graph,·we·must·remember·that·the·function·operates·in·place, |
68 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a | 68 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a |
69 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph | 69 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph |
70 | untouched: | 70 | untouched: |
71 | _\x8g_\x82·=·_\x8g_\x81.copy() | 71 | _\x8g_\x82·=·_\x8g_\x81.copy() |
72 | _\x8g_\x82.simplify() | 72 | _\x8g_\x82.simplify() |
73 | <igraph.Graph·object·at·0xffff | 73 | <igraph.Graph·object·at·0xffff99271050> |
74 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s | 74 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s |
75 | choose·a·consistent·visual·style: | 75 | choose·a·consistent·visual·style: |
76 | _\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8__\x8s_\x8t_\x8y_\x8l_\x8e·=·{ | 76 | _\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8__\x8s_\x8t_\x8y_\x8l_\x8e·=·{ |
77 | ····"vertex_color":·"lightblue", | 77 | ····"vertex_color":·"lightblue", |
78 | ····"vertex_size":·20, | 78 | ····"vertex_size":·20, |
79 | ····"vertex_label":·[0,·1,·2,·3,·4], | 79 | ····"vertex_label":·[0,·1,·2,·3,·4], |
80 | } | 80 | } |
Offset 100, 15 lines modified | Offset 100, 15 lines modified | ||
100 | ····(0,·0),·1,·1,·fc='none',·ec='k',·lw=4,·transform=axs[0].transAxes, | 100 | ····(0,·0),·1,·1,·fc='none',·ec='k',·lw=4,·transform=axs[0].transAxes, |
101 | ····)) | 101 | ····)) |
102 | axs[1].add_patch(plt.Rectangle( | 102 | axs[1].add_patch(plt.Rectangle( |
103 | ····(0,·0),·1,·1,·fc='none',·ec='k',·lw=4,·transform=axs[1].transAxes, | 103 | ····(0,·0),·1,·1,·fc='none',·ec='k',·lw=4,·transform=axs[1].transAxes, |
104 | ····)) | 104 | ····)) |
105 | plt.show() | 105 | plt.show() |
106 | [Multigraph...,·...simplified] | 106 | [Multigraph...,·...simplified] |
107 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0. | 107 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.269·seconds) |
108 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8s_\x8i_\x8m_\x8p_\x8l_\x8i_\x8f_\x8y_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 108 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8s_\x8i_\x8m_\x8p_\x8l_\x8i_\x8f_\x8y_\x8._\x8i_\x8p_\x8y_\x8n_\x8b |
109 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8P_\x8y_\x8t_\x8h_\x8o_\x8n_\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_\x8s·_\x8N_\x8e_\x8x_\x8t | 112 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
113 | =============================================================================== | 113 | =============================================================================== |
114 | ©·Copyright·2010-2025,·The·igraph·development·team. | 114 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 172, 15 lines modified | Offset 172, 15 lines modified | ||
172 | </pre></div> | 172 | </pre></div> |
173 | </div> | 173 | </div> |
174 | <img·src="../_images/sphx_glr_spanning_trees_001.png"·srcset="../_images/sphx_glr_spanning_trees_001.png"·alt="spanning·trees"·class·=·"sphx-glr-single-img"/><div·class="admonition·note"> | 174 | <img·src="../_images/sphx_glr_spanning_trees_001.png"·srcset="../_images/sphx_glr_spanning_trees_001.png"·alt="spanning·trees"·class·=·"sphx-glr-single-img"/><div·class="admonition·note"> |
175 | <p·class="admonition-title">Note</p> | 175 | <p·class="admonition-title">Note</p> |
176 | <p>To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, | 176 | <p>To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, |
177 | you·can·call·<cite>ax.invert_yaxis()</cite>·before·<cite>plt.show()</cite>.</p> | 177 | you·can·call·<cite>ax.invert_yaxis()</cite>·before·<cite>plt.show()</cite>.</p> |
178 | </div> | 178 | </div> |
179 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.4 | 179 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.428·seconds)</p> |
180 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-spanning-trees-py"> | 180 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-spanning-trees-py"> |
181 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 181 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
182 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/babf92113ce2dc7d0ac7ca835125317e/spanning_trees.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">spanning_trees.ipynb</span></code></a></p> | 182 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/babf92113ce2dc7d0ac7ca835125317e/spanning_trees.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">spanning_trees.ipynb</span></code></a></p> |
183 | </div> | 183 | </div> |
184 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 184 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
185 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/84a135646841d3eb216cb170b4755139/spanning_trees.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">spanning_trees.py</span></code></a></p> | 185 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/84a135646841d3eb216cb170b4755139/spanning_trees.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">spanning_trees.py</span></code></a></p> |
186 | </div> | 186 | </div> |
Offset 84, 15 lines modified | Offset 84, 15 lines modified | ||
84 | ····edge_width=_\x8g_\x8._\x8e_\x8s["width"] | 84 | ····edge_width=_\x8g_\x8._\x8e_\x8s["width"] |
85 | ) | 85 | ) |
86 | plt.show() | 86 | plt.show() |
87 | [spanning·trees] | 87 | [spanning·trees] |
88 | Note | 88 | Note |
89 | To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot,·you | 89 | To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot,·you |
90 | can·callax.invert_yaxis()beforeplt.show(). | 90 | can·callax.invert_yaxis()beforeplt.show(). |
91 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.4 | 91 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.428·seconds) |
92 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8s_\x8p_\x8a_\x8n_\x8n_\x8i_\x8n_\x8g_\x8__\x8t_\x8r_\x8e_\x8e_\x8s_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 92 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8s_\x8p_\x8a_\x8n_\x8n_\x8i_\x8n_\x8g_\x8__\x8t_\x8r_\x8e_\x8e_\x8s_\x8._\x8i_\x8p_\x8y_\x8n_\x8b |
93 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8P_\x8y_\x8t_\x8h_\x8o_\x8n_\x8·_\x8s_\x8o_\x8u_\x8r_\x8c_\x8e_\x8·_\x8c_\x8o_\x8d_\x8e_\x8:_\x8·_\x8s_\x8p_\x8a_\x8n_\x8n_\x8i_\x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_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 96 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
97 | =============================================================================== | 97 | =============================================================================== |
98 | ©·Copyright·2010-2025,·The·igraph·development·team. | 98 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 182, 15 lines modified | Offset 182, 15 lines modified | ||
182 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">1</span><span·class="p">:</span>·<span·class="mi">1</span> | 182 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">1</span><span·class="p">:</span>·<span·class="mi">1</span> |
183 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">2</span><span·class="p">:</span>·<span·class="mi">1</span> | 183 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">2</span><span·class="p">:</span>·<span·class="mi">1</span> |
184 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">3</span><span·class="p">:</span>·<span·class="mi">2</span> | 184 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">3</span><span·class="p">:</span>·<span·class="mi">2</span> |
185 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">4</span><span·class="p">:</span>·<span·class="mi">1</span> | 185 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">4</span><span·class="p">:</span>·<span·class="mi">1</span> |
186 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">5</span><span·class="p">:</span>·<span·class="mi">2</span> | 186 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">5</span><span·class="p">:</span>·<span·class="mi">2</span> |
187 | </pre></div> | 187 | </pre></div> |
188 | </div> | 188 | </div> |
189 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.11 | 189 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.119·seconds)</p> |
190 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-topological-sort-py"> | 190 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-topological-sort-py"> |
191 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 191 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
192 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b0d031ac8dedde92ae4e40c8c09bfb2d/topological_sort.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">topological_sort.ipynb</span></code></a></p> | 192 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b0d031ac8dedde92ae4e40c8c09bfb2d/topological_sort.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">topological_sort.ipynb</span></code></a></p> |
193 | </div> | 193 | </div> |
194 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 194 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
195 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/75a0b33a685d1f3ca81fe08e393cf370/topological_sort.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">topological_sort.py</span></code></a></p> | 195 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/75a0b33a685d1f3ca81fe08e393cf370/topological_sort.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">topological_sort.py</span></code></a></p> |
196 | </div> | 196 | </div> |
Offset 94, 15 lines modified | Offset 94, 15 lines modified | ||
94 | [topological·sort] | 94 | [topological·sort] |
95 | degree·of·0:·0 | 95 | degree·of·0:·0 |
96 | degree·of·1:·1 | 96 | degree·of·1:·1 |
97 | degree·of·2:·1 | 97 | degree·of·2:·1 |
98 | degree·of·3:·2 | 98 | degree·of·3:·2 |
99 | degree·of·4:·1 | 99 | degree·of·4:·1 |
100 | degree·of·5:·2 | 100 | degree·of·5:·2 |
101 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.11 | 101 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·0.119·seconds) |
102 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8t_\x8o_\x8p_\x8o_\x8l_\x8o_\x8g_\x8i_\x8c_\x8a_\x8l_\x8__\x8s_\x8o_\x8r_\x8t_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 102 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8t_\x8o_\x8p_\x8o_\x8l_\x8o_\x8g_\x8i_\x8c_\x8a_\x8l_\x8__\x8s_\x8o_\x8r_\x8t_\x8._\x8i_\x8p_\x8y_\x8n_\x8b |
103 | _\x8D_\x8o_\x8w_\x8n_\x8l_\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a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
106 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 106 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
107 | =============================================================================== | 107 | =============================================================================== |
108 | ©·Copyright·2010-2025,·The·igraph·development·team. | 108 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 200, 15 lines modified | Offset 200, 15 lines modified | ||
200 | ········<span·class="mi">30</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·0</span> | 200 | ········<span·class="mi">30</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·0</span> |
201 | ········<span·class="mi">80</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·1</span> | 201 | ········<span·class="mi">80</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·1</span> |
202 | ····<span·class="p">],</span> | 202 | ····<span·class="p">],</span> |
203 | <span·class="p">)</span> | 203 | <span·class="p">)</span> |
204 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 204 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
205 | </pre></div> | 205 | </pre></div> |
206 | </div> | 206 | </div> |
207 | <img·src="../_images/sphx_glr_visual_style_003.png"·srcset="../_images/sphx_glr_visual_style_003.png"·alt="visual·style"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 207 | <img·src="../_images/sphx_glr_visual_style_003.png"·srcset="../_images/sphx_glr_visual_style_003.png"·alt="visual·style"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·2.358·seconds)</p> |
208 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visual-style-py"> | 208 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visual-style-py"> |
209 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 209 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
210 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/79c0d9b4fcedc4cbbf708dabc07e602e/visual_style.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">visual_style.ipynb</span></code></a></p> | 210 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/79c0d9b4fcedc4cbbf708dabc07e602e/visual_style.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">visual_style.ipynb</span></code></a></p> |
211 | </div> | 211 | </div> |
212 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 212 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
213 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/afc268b986c7491fc23c445840ef7388/visual_style.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">visual_style.py</span></code></a></p> | 213 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/afc268b986c7491fc23c445840ef7388/visual_style.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">visual_style.py</span></code></a></p> |
214 | </div> | 214 | </div> |
Offset 109, 15 lines modified | Offset 109, 15 lines modified | ||
109 | ········0,··#·ignored,·the·first·edge·is·not·a·loop | 109 | ········0,··#·ignored,·the·first·edge·is·not·a·loop |
110 | ········30,··#·loop·for·vertex·0 | 110 | ········30,··#·loop·for·vertex·0 |
111 | ········80,··#·loop·for·vertex·1 | 111 | ········80,··#·loop·for·vertex·1 |
112 | ····], | 112 | ····], |
113 | ) | 113 | ) |
114 | plt.show() | 114 | plt.show() |
115 | [visual·style] | 115 | [visual·style] |
116 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes· | 116 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·2.358·seconds) |
117 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8__\x8s_\x8t_\x8y_\x8l_\x8e_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 117 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8__\x8s_\x8t_\x8y_\x8l_\x8e_\x8._\x8i_\x8p_\x8y_\x8n_\x8b |
118 | _\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r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
121 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 121 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
122 | =============================================================================== | 122 | =============================================================================== |
123 | ©·Copyright·2010-2025,·The·igraph·development·team. | 123 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 178, 15 lines modified | Offset 178, 15 lines modified | ||
178 | ········<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">,</span> | 178 | ········<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">,</span> |
179 | ········<span·class="n">target</span><span·class="o">=</span><span·class="n">ax</span><span·class="p">,</span> | 179 | ········<span·class="n">target</span><span·class="o">=</span><span·class="n">ax</span><span·class="p">,</span> |
180 | ····<span·class="p">)</span> | 180 | ····<span·class="p">)</span> |
181 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">axis</span><span·class="p">(</span><span·class="s1">'off'</span><span·class="p">)</span> | 181 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">axis</span><span·class="p">(</span><span·class="s1">'off'</span><span·class="p">)</span> |
182 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 182 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
183 | </pre></div> | 183 | </pre></div> |
184 | </div> | 184 | </div> |
185 | <img·src="../_images/sphx_glr_visualize_cliques_002.png"·srcset="../_images/sphx_glr_visualize_cliques_002.png"·alt="visualize·cliques"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 185 | <img·src="../_images/sphx_glr_visualize_cliques_002.png"·srcset="../_images/sphx_glr_visualize_cliques_002.png"·alt="visualize·cliques"·class·=·"sphx-glr-single-img"/><p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·9.896·seconds)</p> |
186 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-cliques-py"> | 186 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-cliques-py"> |
187 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 187 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
188 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/da65d2622d92114804d208875f9bb90b/visualize_cliques.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">visualize_cliques.ipynb</span></code></a></p> | 188 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/da65d2622d92114804d208875f9bb90b/visualize_cliques.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">visualize_cliques.ipynb</span></code></a></p> |
189 | </div> | 189 | </div> |
190 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 190 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
191 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/e7bcea221487de8e5781ec3f6b3b6c47/visualize_cliques.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">visualize_cliques.py</span></code></a></p> | 191 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/e7bcea221487de8e5781ec3f6b3b6c47/visualize_cliques.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">visualize_cliques.py</span></code></a></p> |
192 | </div> | 192 | </div> |
Offset 92, 15 lines modified | Offset 92, 15 lines modified | ||
92 | ········palette=_\x8i_\x8g_\x8._\x8R_\x8a_\x8i_\x8n_\x8b_\x8o_\x8w_\x8P_\x8a_\x8l_\x8e_\x8t_\x8t_\x8e(), | 92 | ········palette=_\x8i_\x8g_\x8._\x8R_\x8a_\x8i_\x8n_\x8b_\x8o_\x8w_\x8P_\x8a_\x8l_\x8e_\x8t_\x8t_\x8e(), |
93 | ········vertex_size=5, | 93 | ········vertex_size=5, |
94 | ········target=ax, | 94 | ········target=ax, |
95 | ····) | 95 | ····) |
96 | plt.axis('off') | 96 | plt.axis('off') |
97 | plt.show() | 97 | plt.show() |
98 | [visualize·cliques] | 98 | [visualize·cliques] |
99 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes· | 99 | T\x8To\x8ot\x8ta\x8al\x8l·r\x8ru\x8un\x8nn\x8ni\x8in\x8ng\x8g·t\x8ti\x8im\x8me\x8e·o\x8of\x8f·t\x8th\x8he\x8e·s\x8sc\x8cr\x8ri\x8ip\x8pt\x8t:\x8:·(0·minutes·9.896·seconds) |
100 | _\x8D_\x8o_\x8w_\x8n_\x8l_\x8o_\x8a_\x8d_\x8·_\x8J_\x8u_\x8p_\x8y_\x8t_\x8e_\x8r_\x8·_\x8n_\x8o_\x8t_\x8e_\x8b_\x8o_\x8o_\x8k_\x8:_\x8·_\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8i_\x8z_\x8e_\x8__\x8c_\x8l_\x8i_\x8q_\x8u_\x8e_\x8s_\x8._\x8i_\x8p_\x8y_\x8n_\x8b | 100 | _\x8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\x8v_\x8i_\x8s_\x8u_\x8a_\x8l_\x8i_\x8z_\x8e_\x8__\x8c_\x8l_\x8i_\x8q_\x8u_\x8e_\x8s_\x8._\x8z_\x8i_\x8p |
103 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y | 103 | _\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y_\x8·_\x8g_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
104 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 104 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
105 | =============================================================================== | 105 | =============================================================================== |
106 | ©·Copyright·2010-2025,·The·igraph·development·team. | 106 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 174, 15 lines modified | Offset 174, 15 lines modified | ||
174 | ····<span·class="n">bbox_transform</span><span·class="o">=</span><span·class="n">ax</span><span·class="o">.</span><span·class="n">transAxes</span><span·class="p">,</span> | 174 | ····<span·class="n">bbox_transform</span><span·class="o">=</span><span·class="n">ax</span><span·class="o">.</span><span·class="n">transAxes</span><span·class="p">,</span> |
175 | <span·class="p">)</span> | 175 | <span·class="p">)</span> |
176 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 176 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
177 | </pre></div> | 177 | </pre></div> |
178 | </div> | 178 | </div> |
179 | <img·src="../_images/sphx_glr_visualize_communities_001.png"·srcset="../_images/sphx_glr_visualize_communities_001.png"·alt="visualize·communities"·class·=·"sphx-glr-single-img"/><p>For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, | 179 | <img·src="../_images/sphx_glr_visualize_communities_001.png"·srcset="../_images/sphx_glr_visualize_communities_001.png"·alt="visualize·communities"·class·=·"sphx-glr-single-img"/><p>For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, |
180 | check·out·<a·class="reference·internal"·href="cluster_contraction.html#tutorials-cluster-graph"><span·class="std·std-ref">Generating·Cluster·Graphs</span></a>.</p> | 180 | check·out·<a·class="reference·internal"·href="cluster_contraction.html#tutorials-cluster-graph"><span·class="std·std-ref">Generating·Cluster·Graphs</span></a>.</p> |
181 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 181 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.783·seconds)</p> |
182 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-communities-py"> | 182 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-communities-py"> |
183 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 183 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
184 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/f082956eca17112cb706ac88c24e553d/visualize_communities.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">visualize_communities.ipynb</span></code></a></p> | 184 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/f082956eca17112cb706ac88c24e553d/visualize_communities.ipynb"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Jupyter</span>·<span·class="pre">notebook:</span>·<span·class="pre">visualize_communities.ipynb</span></code></a></p> |
185 | </div> | 185 | </div> |
186 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 186 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
187 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a8f8ff572a8d1db2c2c0c6b094e4dcbe/visualize_communities.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">visualize_communities.py</span></code></a></p> | 187 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/a8f8ff572a8d1db2c2c0c6b094e4dcbe/visualize_communities.py"><code·class="xref·download·docutils·literal·notranslate"><span·class="pre">Download</span>·<span·class="pre">Python</span>·<span·class="pre">source</span>·<span·class="pre">code:</span>·<span·class="pre">visualize_communities.py</span></code></a></p> |
188 | </div> | 188 | </div> |
Offset 89, 15 lines modified | Offset 89, 15 lines modified | ||
89 | ····bbox_to_anchor=(0,·1.0), | 89 | ····bbox_to_anchor=(0,·1.0), |
90 | ····bbox_transform=ax.transAxes, | 90 | ····bbox_transform=ax.transAxes, |
91 | ) | 91 | ) |
92 | plt.show() | 92 | plt.show() |
93 | [visualize·communities] | 93 | [visualize·communities] |
94 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, | 94 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, |
95 | check·out·_\x8G_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8i_\x8n_\x8g_\x8·_\x8C_\x8l_\x8u_\x8s_\x8t_\x8e_\x8r_\x8·_\x8G_\x8r_\x8a_\x8p_\x8h_\x8s. | 95 | check·out·_\x8G_\x8e_\x8n_\x8e_\x8r_\x8a_\x8t_\x8i_\x8n_\x8g_\x8·_\x8C_\x8l_\x8u_\x8s_\x8t_\x8e_\x8r_\x8·_\x8G_\x8r_\x8a_\x8p_\x8h_\x8s. |
96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_\x8n_\x8e_\x8r_\x8a_\x8t_\x8e_\x8d_\x8·_\x8b_\x8y_\x8·_\x8S_\x8p_\x8h_\x8i_\x8n_\x8x_\x8-_\x8G_\x8a_\x8l_\x8l_\x8e_\x8r_\x8y |
101 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t | 101 | _\x8P_\x8r_\x8e_\x8v_\x8i_\x8o_\x8u_\x8s·_\x8N_\x8e_\x8x_\x8t |
102 | =============================================================================== | 102 | =============================================================================== |
103 | ©·Copyright·2010-2025,·The·igraph·development·team. | 103 | ©·Copyright·2010-2025,·The·igraph·development·team. |
Offset 284, 15 lines modified | Offset 284, 15 lines modified | ||
284 | vertex_size=15, | 284 | vertex_size=15, |
285 | vertex_color="grey", | 285 | vertex_color="grey", |
286 | edge_color="#222", | 286 | edge_color="#222", |
287 | edge_width=1, | 287 | edge_width=1, |
288 | ) | 288 | ) |
289 | plt.show() | 289 | plt.show() |
290 | Total·running·time·of·the·script:·(0·minutes·0. | 290 | Total·running·time·of·the·script:·(0·minutes·0.504·seconds) |
291 | 2.2.2·Connected·Components | 291 | 2.2.2·Connected·Components |
292 | This·example·demonstrates·how·to·visualise·the·connected·components·in·a·graph·using·igraph.GraphBase. | 292 | This·example·demonstrates·how·to·visualise·the·connected·components·in·a·graph·using·igraph.GraphBase. |
293 | connected_components(). | 293 | connected_components(). |
294 | import·igraph·as·ig | 294 | import·igraph·as·ig |
295 | import·matplotlib.pyplot·as·plt | 295 | import·matplotlib.pyplot·as·plt |
296 | import·random | 296 | import·random |
Offset 327, 15 lines modified | Offset 327, 15 lines modified | ||
327 | 11 | 327 | 11 |
328 | \xcigraph·Documentation,·Release·0.11.9 | 328 | \xcigraph·Documentation,·Release·0.11.9 |
329 | We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex·colors,·since·255·in·the·igraph.drawing. | 329 | We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex·colors,·since·255·in·the·igraph.drawing. |
330 | colors.RainbowPalette·corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues. | 330 | colors.RainbowPalette·corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues. |
331 | Total·running·time·of·the·script:·(0·minutes·0.57 | 331 | Total·running·time·of·the·script:·(0·minutes·0.577·seconds) |
332 | 2.2.3·Configuration·Instance | 332 | 2.2.3·Configuration·Instance |
333 | This·example·shows·how·to·use·igraph’s·configuration·instance·to·set·default·igraph·settings.·This·is·useful·for | 333 | This·example·shows·how·to·use·igraph’s·configuration·instance·to·set·default·igraph·settings.·This·is·useful·for |
334 | setting·global·settings·so·that·they·don’t·need·to·be·explicitly·stated·at·the·beginning·of·every·igraph·project·you·work | 334 | setting·global·settings·so·that·they·don’t·need·to·be·explicitly·stated·at·the·beginning·of·every·igraph·project·you·work |
335 | on. | 335 | on. |
336 | import·igraph·as·ig | 336 | import·igraph·as·ig |
337 | import·matplotlib.pyplot·as·plt | 337 | import·matplotlib.pyplot·as·plt |
Offset 369, 15 lines modified | Offset 369, 15 lines modified | ||
369 | The·full·list·of·config·settings·can·be·found·at·igraph.Configuration. | 369 | The·full·list·of·config·settings·can·be·found·at·igraph.Configuration. |
370 | Note | 370 | Note |
371 | You·can·have·multiple·config·files:·specify·each·location·via·ig.config.save("./path/to/config/file"). | 371 | You·can·have·multiple·config·files:·specify·each·location·via·ig.config.save("./path/to/config/file"). |
372 | To·load·a·specific·config,·import·igraph·and·then·call·ig.config.load("./path/to/config/file") | 372 | To·load·a·specific·config,·import·igraph·and·then·call·ig.config.load("./path/to/config/file") |
373 | Note | 373 | Note |
374 | To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes,·colors,·layout·etc.)·check·out·Visual·styling. | 374 | To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes,·colors,·layout·etc.)·check·out·Visual·styling. |
375 | Total·running·time·of·the·script:·(0·minutes·1.1 | 375 | Total·running·time·of·the·script:·(0·minutes·1.137·seconds) |
376 | 2.2.4·Articulation·Points | 376 | 2.2.4·Articulation·Points |
377 | This·example·shows·how·to·compute·and·visualize·the·articulation·points·in·a·graph·using·igraph.GraphBase. | 377 | This·example·shows·how·to·compute·and·visualize·the·articulation·points·in·a·graph·using·igraph.GraphBase. |
378 | articulation_points().·For·an·example·on·bridges·instead,·see·Bridges. | 378 | articulation_points().·For·an·example·on·bridges·instead,·see·Bridges. |
379 | import·igraph·as·ig | 379 | import·igraph·as·ig |
380 | import·matplotlib.pyplot·as·plt | 380 | import·matplotlib.pyplot·as·plt |
381 | First,·we·construct·a·graph.·This·example·shows·usage·of·graph·formulae: | 381 | First,·we·construct·a·graph.·This·example·shows·usage·of·graph·formulae: |
Offset 410, 15 lines modified | Offset 410, 15 lines modified | ||
410 | 14 | 410 | 14 |
411 | Chapter·2.·Documentation | 411 | Chapter·2.·Documentation |
412 | \xcigraph·Documentation,·Release·0.11.9 | 412 | \xcigraph·Documentation,·Release·0.11.9 |
413 | Total·running·time·of·the·script:·(0·minutes·0.1 | 413 | Total·running·time·of·the·script:·(0·minutes·0.145·seconds) |
414 | 2.2.5·Maximum·Flow | 414 | 2.2.5·Maximum·Flow |
415 | This·example·shows·how·to·construct·a·max·flow·on·a·directed·graph·with·edge·capacities·using·igraph.Graph. | 415 | This·example·shows·how·to·construct·a·max·flow·on·a·directed·graph·with·edge·capacities·using·igraph.Graph. |
416 | maxflow(). | 416 | maxflow(). |
417 | import·igraph·as·ig | 417 | import·igraph·as·ig |
418 | import·matplotlib.pyplot·as·plt | 418 | import·matplotlib.pyplot·as·plt |
419 | First,·we·generate·a·graph·and·assign·a·“capacity”·to·each·edge: | 419 | First,·we·generate·a·graph·and·assign·a·“capacity”·to·each·edge: |
Offset 450, 15 lines modified | Offset 450, 15 lines modified | ||
450 | 2.2.·Gallery·of·Examples | 450 | 2.2.·Gallery·of·Examples |
451 | 15 | 451 | 15 |
452 | \xcigraph·Documentation,·Release·0.11.9 | 452 | \xcigraph·Documentation,·Release·0.11.9 |
453 | Total·running·time·of·the·script:·(0·minutes·0.1 | 453 | Total·running·time·of·the·script:·(0·minutes·0.129·seconds) |
454 | 2.2.6·Minimum·Spanning·Trees | 454 | 2.2.6·Minimum·Spanning·Trees |
455 | This·example·shows·how·to·generate·a·minimum·spanning·tree·from·an·input·graph·using·igraph.Graph. | 455 | This·example·shows·how·to·generate·a·minimum·spanning·tree·from·an·input·graph·using·igraph.Graph. |
456 | spanning_tree().·If·you·only·need·a·regular·spanning·tree,·check·out·Spanning·Trees. | 456 | spanning_tree().·If·you·only·need·a·regular·spanning·tree,·check·out·Spanning·Trees. |
457 | import·random | 457 | import·random |
458 | import·igraph·as·ig | 458 | import·igraph·as·ig |
459 | import·matplotlib.pyplot·as·plt | 459 | import·matplotlib.pyplot·as·plt |
Offset 499, 15 lines modified | Offset 499, 15 lines modified | ||
499 | 2.2.·Gallery·of·Examples | 499 | 2.2.·Gallery·of·Examples |
500 | 17 | 500 | 17 |
501 | \xcigraph·Documentation,·Release·0.11.9 | 501 | \xcigraph·Documentation,·Release·0.11.9 |
502 | Total·running·time·of·the·script:·(0·minutes·0.35 | 502 | Total·running·time·of·the·script:·(0·minutes·0.350·seconds) |
503 | 2.2.7·Spanning·Trees | 503 | 2.2.7·Spanning·Trees |
504 | This·example·shows·how·to·generate·a·spanning·tree·from·an·input·graph·using·igraph.Graph.spanning_tree(). | 504 | This·example·shows·how·to·generate·a·spanning·tree·from·an·input·graph·using·igraph.Graph.spanning_tree(). |
505 | For·the·related·idea·of·finding·a·minimum·spanning·tree,·see·Minimum·Spanning·Trees. | 505 | For·the·related·idea·of·finding·a·minimum·spanning·tree,·see·Minimum·Spanning·Trees. |
506 | import·igraph·as·ig | 506 | import·igraph·as·ig |
507 | import·matplotlib.pyplot·as·plt | 507 | import·matplotlib.pyplot·as·plt |
508 | import·random | 508 | import·random |
Offset 557, 15 lines modified | Offset 557, 15 lines modified | ||
557 | 19 | 557 | 19 |
558 | \xcigraph·Documentation,·Release·0.11.9 | 558 | \xcigraph·Documentation,·Release·0.11.9 |
559 | Note | 559 | Note |
560 | To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot,·you·can·call·ax.invert_yaxis()·before·plt.show(). | 560 | To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot,·you·can·call·ax.invert_yaxis()·before·plt.show(). |
561 | Total·running·time·of·the·script:·(0·minutes·0.4 | 561 | Total·running·time·of·the·script:·(0·minutes·0.428·seconds) |
562 | 2.2.8·Complement | 562 | 2.2.8·Complement |
563 | This·example·shows·how·to·generate·the·complement·graph·of·a·graph·(sometimes·known·as·the·anti-graph)·using | 563 | This·example·shows·how·to·generate·the·complement·graph·of·a·graph·(sometimes·known·as·the·anti-graph)·using |
564 | igraph.GraphBase.complementer(). | 564 | igraph.GraphBase.complementer(). |
565 | import·igraph·as·ig | 565 | import·igraph·as·ig |
566 | import·matplotlib.pyplot·as·plt | 566 | import·matplotlib.pyplot·as·plt |
567 | import·random | 567 | import·random |
Offset 626, 15 lines modified | Offset 626, 15 lines modified | ||
626 | 2.2.·Gallery·of·Examples | 626 | 2.2.·Gallery·of·Examples |
627 | 21 | 627 | 21 |
628 | \xcigraph·Documentation,·Release·0.11.9 | 628 | \xcigraph·Documentation,·Release·0.11.9 |
629 | Total·running·time·of·the·script:·(0·minutes·0.52 | 629 | Total·running·time·of·the·script:·(0·minutes·0.522·seconds) |
630 | 2.2.9·Maximum·Bipartite·Matching | 630 | 2.2.9·Maximum·Bipartite·Matching |
631 | This·example·demonstrates·an·efficient·way·to·find·and·visualise·a·maximum·biparite·matching·using·igraph.Graph. | 631 | This·example·demonstrates·an·efficient·way·to·find·and·visualise·a·maximum·biparite·matching·using·igraph.Graph. |
632 | maximum_bipartite_matching(). | 632 | maximum_bipartite_matching(). |
633 | import·igraph·as·ig | 633 | import·igraph·as·ig |
634 | import·matplotlib.pyplot·as·plt | 634 | import·matplotlib.pyplot·as·plt |
635 | First,·we·construct·a·bipartite·graph,·assigning: | 635 | First,·we·construct·a·bipartite·graph,·assigning: |
Max diff block lines reached; 11946/16608 bytes (71.93%) of diff not shown. |