| Offset 1, 4 lines modified | Offset 1, 4 lines modified | ||
| 1 | · | 1 | ·133a89177509ae14ca64198f7049556c·6617608·doc·optional·python-igraph-doc_1.0.0+ds-1_all.deb |
| 2 | ·82ab3375e23b33877e46ae08f3aed616·391192·debug·optional·python3-igraph-dbgsym_1.0.0+ds-1_amd64.deb | 2 | ·82ab3375e23b33877e46ae08f3aed616·391192·debug·optional·python3-igraph-dbgsym_1.0.0+ds-1_amd64.deb |
| 3 | ·a629c53f5bcb8d252547c250153b07c7·343068·python·optional·python3-igraph_1.0.0+ds-1_amd64.deb | 3 | ·a629c53f5bcb8d252547c250153b07c7·343068·python·optional·python3-igraph_1.0.0+ds-1_amd64.deb |
| Offset 1, 3 lines modified | Offset 1, 3 lines modified | ||
| 1 | -rw-r--r--···0········0········0········4·2025-10-25·13:57:57.000000·debian-binary | 1 | -rw-r--r--···0········0········0········4·2025-10-25·13:57:57.000000·debian-binary |
| 2 | -rw-r--r--···0········0········0····1422 | 2 | -rw-r--r--···0········0········0····14224·2025-10-25·13:57:57.000000·control.tar.xz |
| 3 | -rw-r--r--···0········0········0··66031 | 3 | -rw-r--r--···0········0········0··6603192·2025-10-25·13:57:57.000000·data.tar.xz |
| Offset 533, 15 lines modified | Offset 533, 15 lines modified | ||
| 533 | -rw-r--r--···0·root·········(0)·root·········(0)····18355·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/faq.html | 533 | -rw-r--r--···0·root·········(0)·root·········(0)····18355·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/faq.html |
| 534 | -rw-r--r--···0·root·········(0)·root·········(0)····31858·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/generation.html | 534 | -rw-r--r--···0·root·········(0)·root·········(0)····31858·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/generation.html |
| 535 | -rw-r--r--···0·root·········(0)·root·········(0)·····4684·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/genindex.html | 535 | -rw-r--r--···0·root·········(0)·root·········(0)·····4684·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/genindex.html |
| 536 | -rw-r--r--···0·root·········(0)·root·········(0)····10453·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/index.html | 536 | -rw-r--r--···0·root·········(0)·root·········(0)····10453·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/index.html |
| 537 | -rw-r--r--···0·root·········(0)·root·········(0)····25679·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/install.html | 537 | -rw-r--r--···0·root·········(0)·root·········(0)····25679·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/install.html |
| 538 | -rw-r--r--···0·root·········(0)·root·········(0)·····2047·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/objects.inv | 538 | -rw-r--r--···0·root·········(0)·root·········(0)·····2047·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/objects.inv |
| 539 | -rw-r--r--···0·root·········(0)·root·········(0)·····5083·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/search.html | 539 | -rw-r--r--···0·root·········(0)·root·········(0)·····5083·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/search.html |
| 540 | -rw-r--r--···0·root·········(0)·root·········(0)····689 | 540 | -rw-r--r--···0·root·········(0)·root·········(0)····68906·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/searchindex.js |
| 541 | -rw-r--r--···0·root·········(0)·root·········(0)···128390·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorial.es.html | 541 | -rw-r--r--···0·root·········(0)·root·········(0)···128390·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorial.es.html |
| 542 | -rw-r--r--···0·root·········(0)·root·········(0)···135819·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorial.html | 542 | -rw-r--r--···0·root·········(0)·root·········(0)···135819·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorial.html |
| 543 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/ | 543 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/ |
| 544 | -rw-r--r--···0·root·········(0)·root·········(0)····17433·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/articulation_points.html | 544 | -rw-r--r--···0·root·········(0)·root·········(0)····17433·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/articulation_points.html |
| 545 | -rw-r--r--···0·root·········(0)·root·········(0)····30071·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/betweenness.html | 545 | -rw-r--r--···0·root·········(0)·root·········(0)····30071·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/betweenness.html |
| 546 | -rw-r--r--···0·root·········(0)·root·········(0)····24075·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/bipartite_matching.html | 546 | -rw-r--r--···0·root·········(0)·root·········(0)····24075·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/bipartite_matching.html |
| 547 | -rw-r--r--···0·root·········(0)·root·········(0)····27994·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/bipartite_matching_maxflow.html | 547 | -rw-r--r--···0·root·········(0)·root·········(0)····27994·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/bipartite_matching_maxflow.html |
| Offset 566, 15 lines modified | Offset 566, 15 lines modified | ||
| 566 | -rw-r--r--···0·root·········(0)·root·········(0)····24534·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/spanning_trees.html | 566 | -rw-r--r--···0·root·········(0)·root·········(0)····24534·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/spanning_trees.html |
| 567 | -rw-r--r--···0·root·········(0)·root·········(0)····44508·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/stochastic_variability.html | 567 | -rw-r--r--···0·root·········(0)·root·········(0)····44508·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/stochastic_variability.html |
| 568 | -rw-r--r--···0·root·········(0)·root·········(0)····24309·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/topological_sort.html | 568 | -rw-r--r--···0·root·········(0)·root·········(0)····24309·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/topological_sort.html |
| 569 | -rw-r--r--···0·root·········(0)·root·········(0)····27541·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visual_style.html | 569 | -rw-r--r--···0·root·········(0)·root·········(0)····27541·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visual_style.html |
| 570 | -rw-r--r--···0·root·········(0)·root·········(0)····24143·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_cliques.html | 570 | -rw-r--r--···0·root·········(0)·root·········(0)····24143·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_cliques.html |
| 571 | -rw-r--r--···0·root·········(0)·root·········(0)····24299·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_communities.html | 571 | -rw-r--r--···0·root·········(0)·root·········(0)····24299·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/tutorials/visualize_communities.html |
| 572 | -rw-r--r--···0·root·········(0)·root·········(0)····33575·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/visualisation.html | 572 | -rw-r--r--···0·root·········(0)·root·········(0)····33575·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/visualisation.html |
| 573 | -rw-r--r--···0·root·········(0)·root·········(0)··21048 | 573 | -rw-r--r--···0·root·········(0)·root·········(0)··2104812·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/igraph.pdf.gz |
| 574 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc-base/ | 574 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc-base/ |
| 575 | -rw-r--r--···0·root·········(0)·root·········(0)······362·2024-05-10·15:38:04.000000·./usr/share/doc-base/python-igraph-doc.igraph | 575 | -rw-r--r--···0·root·········(0)·root·········(0)······362·2024-05-10·15:38:04.000000·./usr/share/doc-base/python-igraph-doc.igraph |
| 576 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/lintian/ | 576 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/lintian/ |
| 577 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/lintian/overrides/ | 577 | drwxr-xr-x···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/lintian/overrides/ |
| 578 | -rw-r--r--···0·root·········(0)·root·········(0)······154·2024-05-10·15:38:04.000000·./usr/share/lintian/overrides/python-igraph-doc | 578 | -rw-r--r--···0·root·········(0)·root·········(0)······154·2024-05-10·15:38:04.000000·./usr/share/lintian/overrides/python-igraph-doc |
| 579 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/_static/css/badge_only.css·->·../../../../../sphinx_rtd_theme/static/css/badge_only.css | 579 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/_static/css/badge_only.css·->·../../../../../sphinx_rtd_theme/static/css/badge_only.css |
| 580 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/_static/css/theme.css·->·../../../../../sphinx_rtd_theme/static/css/theme.css | 580 | lrwxrwxrwx···0·root·········(0)·root·········(0)········0·2025-10-25·13:57:57.000000·./usr/share/doc/python-igraph-doc/html/_static/css/theme.css·->·../../../../../sphinx_rtd_theme/static/css/theme.css |
| Offset 109, 15 lines modified | Offset 109, 15 lines modified | ||
| 109 | ..·rst-class::·sphx-glr-timing | 109 | ..·rst-class::·sphx-glr-timing |
| 110 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 110 | ···**Total·running·time·of·the·script:**·(0·minutes·0.718·seconds) |
| 111 | ..·_sphx_glr_download_tutorials_articulation_points.py: | 111 | ..·_sphx_glr_download_tutorials_articulation_points.py: |
| 112 | ..·only::·html | 112 | ..·only::·html |
| 113 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 113 | ··..·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·3.111·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 162, 22 lines modified | Offset 162, 22 lines modified | ||
| 162 | ..·rst-class::·sphx-glr-script-out | 162 | ..·rst-class::·sphx-glr-script-out |
| 163 | ·..·code-block::·none | 163 | ·..·code-block::·none |
| 164 | ····<igraph.drawing.matplotlib.graph.GraphArtist·object·at·0x7f | 164 | ····<igraph.drawing.matplotlib.graph.GraphArtist·object·at·0x7f3ebc0c7390> |
| 165 | ..·rst-class::·sphx-glr-timing | 165 | ..·rst-class::·sphx-glr-timing |
| 166 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 166 | ···**Total·running·time·of·the·script:**·(0·minutes·0.199·seconds) |
| 167 | ..·_sphx_glr_download_tutorials_bipartite_matching.py: | 167 | ..·_sphx_glr_download_tutorials_bipartite_matching.py: |
| 168 | ..·only::·html | 168 | ..·only::·html |
| 169 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 169 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 177, 15 lines modified | Offset 177, 15 lines modified | ||
| 177 | ..·rst-class::·sphx-glr-timing | 177 | ..·rst-class::·sphx-glr-timing |
| 178 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 178 | ···**Total·running·time·of·the·script:**·(0·minutes·0.234·seconds) |
| 179 | ..·_sphx_glr_download_tutorials_bipartite_matching_maxflow.py: | 179 | ..·_sphx_glr_download_tutorials_bipartite_matching_maxflow.py: |
| 180 | ..·only::·html | 180 | ..·only::·html |
| 181 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 181 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 210, 15 lines modified | Offset 210, 15 lines modified | ||
| 210 | ..·rst-class::·sphx-glr-timing | 210 | ..·rst-class::·sphx-glr-timing |
| 211 | ···**Total·running·time·of·the·script:**·(0·minutes· | 211 | ···**Total·running·time·of·the·script:**·(0·minutes·0.590·seconds) |
| 212 | ..·_sphx_glr_download_tutorials_bridges.py: | 212 | ..·_sphx_glr_download_tutorials_bridges.py: |
| 213 | ..·only::·html | 213 | ..·only::·html |
| 214 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 214 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 406, 15 lines modified | Offset 406, 15 lines modified | ||
| 406 | ..·rst-class::·sphx-glr-timing | 406 | ..·rst-class::·sphx-glr-timing |
| 407 | ···**Total·running·time·of·the·script:**·(0·minutes· | 407 | ···**Total·running·time·of·the·script:**·(0·minutes·2.995·seconds) |
| 408 | ..·_sphx_glr_download_tutorials_cluster_contraction.py: | 408 | ..·_sphx_glr_download_tutorials_cluster_contraction.py: |
| 409 | ..·only::·html | 409 | ..·only::·html |
| 410 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 410 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 174, 15 lines modified | Offset 174, 15 lines modified | ||
| 174 | ..·rst-class::·sphx-glr-timing | 174 | ..·rst-class::·sphx-glr-timing |
| 175 | ···**Total·running·time·of·the·script:**·(0·minutes· | 175 | ···**Total·running·time·of·the·script:**·(0·minutes·0.762·seconds) |
| 176 | ..·_sphx_glr_download_tutorials_complement.py: | 176 | ..·_sphx_glr_download_tutorials_complement.py: |
| 177 | ..·only::·html | 177 | ..·only::·html |
| 178 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 178 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 148, 15 lines modified | Offset 148, 15 lines modified | ||
| 148 | ····To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, | 148 | ····To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, |
| 149 | ····colors,·layout·etc.)·check·out·:ref:`tutorials-visual-style`. | 149 | ····colors,·layout·etc.)·check·out·:ref:`tutorials-visual-style`. |
| 150 | ..·rst-class::·sphx-glr-timing | 150 | ..·rst-class::·sphx-glr-timing |
| 151 | ···**Total·running·time·of·the·script:**·(0·minutes· | 151 | ···**Total·running·time·of·the·script:**·(0·minutes·1.729·seconds) |
| 152 | ..·_sphx_glr_download_tutorials_configuration.py: | 152 | ..·_sphx_glr_download_tutorials_configuration.py: |
| 153 | ..·only::·html | 153 | ..·only::·html |
| 154 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 154 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 118, 15 lines modified | Offset 118, 15 lines modified | ||
| 118 | ····We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex | 118 | ····We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex |
| 119 | ····colors,·since·255·in·the·:class:`igraph.drawing.colors.RainbowPalette` | 119 | ····colors,·since·255·in·the·:class:`igraph.drawing.colors.RainbowPalette` |
| 120 | ····corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues. | 120 | ····corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues. |
| 121 | ..·rst-class::·sphx-glr-timing | 121 | ..·rst-class::·sphx-glr-timing |
| 122 | ···**Total·running·time·of·the·script:**·(0·minutes· | 122 | ···**Total·running·time·of·the·script:**·(0·minutes·0.868·seconds) |
| 123 | ..·_sphx_glr_download_tutorials_connected_components.py: | 123 | ..·_sphx_glr_download_tutorials_connected_components.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-script-out | 141 | ..·rst-class::·sphx-glr-script-out |
| 142 | ·..·code-block::·none | 142 | ·..·code-block::·none |
| 143 | ····<igraph.Graph·object·at·0x7f | 143 | ····<igraph.Graph·object·at·0x7f3eaf8af550> |
| 144 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·53-55 | 144 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·53-55 |
| 145 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks | 145 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks |
| 146 | like: | 146 | like: |
| 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· | 246 | ···**Total·running·time·of·the·script:**·(0·minutes·0.879·seconds) |
| 247 | ..·_sphx_glr_download_tutorials_delaunay-triangulation.py: | 247 | ..·_sphx_glr_download_tutorials_delaunay-triangulation.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 165, 15 lines modified | Offset 165, 15 lines modified | ||
| 165 | ..·rst-class::·sphx-glr-timing | 165 | ..·rst-class::·sphx-glr-timing |
| 166 | ···**Total·running·time·of·the·script:**·(0·minutes· | 166 | ···**Total·running·time·of·the·script:**·(0·minutes·1.281·seconds) |
| 167 | ..·_sphx_glr_download_tutorials_erdos_renyi.py: | 167 | ..·_sphx_glr_download_tutorials_erdos_renyi.py: |
| 168 | ..·only::·html | 168 | ..·only::·html |
| 169 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 169 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 148, 15 lines modified | Offset 148, 15 lines modified | ||
| 148 | ..·rst-class::·sphx-glr-timing | 148 | ..·rst-class::·sphx-glr-timing |
| 149 | ···**Total·running·time·of·the·script:**·(0·minutes· | 149 | ···**Total·running·time·of·the·script:**·(0·minutes·0.660·seconds) |
| 150 | ..·_sphx_glr_download_tutorials_generate_dag.py: | 150 | ..·_sphx_glr_download_tutorials_generate_dag.py: |
| 151 | ..·only::·html | 151 | ..·only::·html |
| 152 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 152 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 169, 15 lines modified | Offset 169, 15 lines modified | ||
| 169 | ..·rst-class::·sphx-glr-timing | 169 | ..·rst-class::·sphx-glr-timing |
| 170 | ···**Total·running·time·of·the·script:**·(0·minutes· | 170 | ···**Total·running·time·of·the·script:**·(0·minutes·2.547·seconds) |
| 171 | ..·_sphx_glr_download_tutorials_isomorphism.py: | 171 | ..·_sphx_glr_download_tutorials_isomorphism.py: |
| 172 | ..·only::·html | 172 | ..·only::·html |
| 173 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 173 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 118, 15 lines modified | Offset 118, 15 lines modified | ||
| 118 | ..·rst-class::·sphx-glr-timing | 118 | ..·rst-class::·sphx-glr-timing |
| 119 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 119 | ···**Total·running·time·of·the·script:**·(0·minutes·0.139·seconds) |
| 120 | ..·_sphx_glr_download_tutorials_maxflow.py: | 120 | ..·_sphx_glr_download_tutorials_maxflow.py: |
| 121 | ..·only::·html | 121 | ..·only::·html |
| 122 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 122 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 142, 15 lines modified | Offset 142, 15 lines modified | ||
| 142 | ..·rst-class::·sphx-glr-timing | 142 | ..·rst-class::·sphx-glr-timing |
| 143 | ···**Total·running·time·of·the·script:**·(0·minutes· | 143 | ···**Total·running·time·of·the·script:**·(0·minutes·0.508·seconds) |
| 144 | ..·_sphx_glr_download_tutorials_minimum_spanning_trees.py: | 144 | ..·_sphx_glr_download_tutorials_minimum_spanning_trees.py: |
| 145 | ..·only::·html | 145 | ..·only::·html |
| 146 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 146 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 246, 15 lines modified | Offset 246, 15 lines modified | ||
| 246 | ..·rst-class::·sphx-glr-timing | 246 | ..·rst-class::·sphx-glr-timing |
| 247 | ···**Total·running·time·of·the·script:**·(0·minutes· | 247 | ···**Total·running·time·of·the·script:**·(0·minutes·0.557·seconds) |
| 248 | ..·_sphx_glr_download_tutorials_online_user_actions.py: | 248 | ..·_sphx_glr_download_tutorials_online_user_actions.py: |
| 249 | ..·only::·html | 249 | ..·only::·html |
| 250 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 250 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 240, 15 lines modified | Offset 240, 15 lines modified | ||
| 240 | ..·rst-class::·sphx-glr-timing | 240 | ..·rst-class::·sphx-glr-timing |
| 241 | ···**Total·running·time·of·the·script:**·(0·minutes· | 241 | ···**Total·running·time·of·the·script:**·(0·minutes·7.126·seconds) |
| 242 | ..·_sphx_glr_download_tutorials_personalized_pagerank.py: | 242 | ..·_sphx_glr_download_tutorials_personalized_pagerank.py: |
| 243 | ..·only::·html | 243 | ..·only::·html |
| 244 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 244 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 113, 15 lines modified | Offset 113, 15 lines modified | ||
| 113 | ····#·Export·and·import·a·graph·as·a·GML·file. | 113 | ····#·Export·and·import·a·graph·as·a·GML·file. |
| 114 | ····g.save("social_network.gml") | 114 | ····g.save("social_network.gml") |
| 115 | ····g·=·ig.load("social_network.gml") | 115 | ····g·=·ig.load("social_network.gml") |
| 116 | ..·rst-class::·sphx-glr-timing | 116 | ..·rst-class::·sphx-glr-timing |
| 117 | ···**Total·running·time·of·the·script:**·(0·minutes· | 117 | ···**Total·running·time·of·the·script:**·(0·minutes·2.189·seconds) |
| 118 | ..·_sphx_glr_download_tutorials_quickstart.py: | 118 | ..·_sphx_glr_download_tutorials_quickstart.py: |
| 119 | ..·only::·html | 119 | ..·only::·html |
| 120 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 120 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 342, 62 lines modified | Offset 342, 62 lines modified | ||
| 342 | ·····.anim-state·input·{ | 342 | ·····.anim-state·input·{ |
| 343 | ·········margin:·0; | 343 | ·········margin:·0; |
| 344 | ·········vertical-align:·middle; | 344 | ·········vertical-align:·middle; |
| 345 | ·····} | 345 | ·····} |
| 346 | ·····</style> | 346 | ·····</style> |
| 347 | ·····<div·class="animation"> | 347 | ·····<div·class="animation"> |
| 348 | ·······<img·id="_anim_img | 348 | ·······<img·id="_anim_img6455ccbe55464047b94702b1e2f5c62a"> |
| 349 | ·······<div·class="anim-controls"> | 349 | ·······<div·class="anim-controls"> |
| 350 | ·········<input·id="_anim_slider | 350 | ·········<input·id="_anim_slider6455ccbe55464047b94702b1e2f5c62a"·type="range"·class="anim-slider" |
| 351 | ················name="points"·min="0"·max="1"·step="1"·value="0" | 351 | ················name="points"·min="0"·max="1"·step="1"·value="0" |
| 352 | ················oninput="anim | 352 | ················oninput="anim6455ccbe55464047b94702b1e2f5c62a.set_frame(parseInt(this.value));"> |
| 353 | ·········<div·class="anim-buttons"> | 353 | ·········<div·class="anim-buttons"> |
| 354 | ···········<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="anim | 354 | ···········<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.slower()"> |
| 355 | ···············<i·class="fa·fa-minus"></i></button> | 355 | ···············<i·class="fa·fa-minus"></i></button> |
| 356 | ···········<button·title="First·frame"·aria-label="First·frame"·onclick="anim | 356 | ···········<button·title="First·frame"·aria-label="First·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.first_frame()"> |
| 357 | ·············<i·class="fa·fa-fast-backward"></i></button> | 357 | ·············<i·class="fa·fa-fast-backward"></i></button> |
| 358 | ···········<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="anim | 358 | ···········<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.previous_frame()"> |
| 359 | ···············<i·class="fa·fa-step-backward"></i></button> | 359 | ···············<i·class="fa·fa-step-backward"></i></button> |
| 360 | ···········<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="anim | 360 | ···········<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.reverse_animation()"> |
| 361 | ···············<i·class="fa·fa-play·fa-flip-horizontal"></i></button> | 361 | ···············<i·class="fa·fa-play·fa-flip-horizontal"></i></button> |
| 362 | ···········<button·title="Pause"·aria-label="Pause"·onclick="anim | 362 | ···········<button·title="Pause"·aria-label="Pause"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.pause_animation()"> |
| 363 | ···············<i·class="fa·fa-pause"></i></button> | 363 | ···············<i·class="fa·fa-pause"></i></button> |
| 364 | ···········<button·title="Play"·aria-label="Play"·onclick="anim | 364 | ···········<button·title="Play"·aria-label="Play"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.play_animation()"> |
| 365 | ···············<i·class="fa·fa-play"></i></button> | 365 | ···············<i·class="fa·fa-play"></i></button> |
| 366 | ···········<button·title="Next·frame"·aria-label="Next·frame"·onclick="anim | 366 | ···········<button·title="Next·frame"·aria-label="Next·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.next_frame()"> |
| 367 | ···············<i·class="fa·fa-step-forward"></i></button> | 367 | ···············<i·class="fa·fa-step-forward"></i></button> |
| 368 | ···········<button·title="Last·frame"·aria-label="Last·frame"·onclick="anim | 368 | ···········<button·title="Last·frame"·aria-label="Last·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.last_frame()"> |
| 369 | ···············<i·class="fa·fa-fast-forward"></i></button> | 369 | ···············<i·class="fa·fa-fast-forward"></i></button> |
| 370 | ···········<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="anim | 370 | ···········<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.faster()"> |
| 371 | ···············<i·class="fa·fa-plus"></i></button> | 371 | ···············<i·class="fa·fa-plus"></i></button> |
| 372 | ·········</div> | 372 | ·········</div> |
| 373 | ·········<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_select | 373 | ·········<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_select6455ccbe55464047b94702b1e2f5c62a" |
| 374 | ···············class="anim-state"> | 374 | ···············class="anim-state"> |
| 375 | ···········<input·type="radio"·name="state"·value="once"·id="_anim_radio1_ | 375 | ···········<input·type="radio"·name="state"·value="once"·id="_anim_radio1_6455ccbe55464047b94702b1e2f5c62a" |
| 376 | ··················> | 376 | ··················> |
| 377 | ···········<label·for="_anim_radio1_07c18edf426e47cb8fbf7c7d19ed8fa0">Once</label> | ||
| 378 | ···········< | 377 | ···········<label·for="_anim_radio1_6455ccbe55464047b94702b1e2f5c62a">Once</label> |
| 378 | ···········<input·type="radio"·name="state"·value="loop"·id="_anim_radio2_6455ccbe55464047b94702b1e2f5c62a" | ||
| 379 | ··················checked> | 379 | ··················checked> |
| 380 | ···········<label·for="_anim_radio2_ | 380 | ···········<label·for="_anim_radio2_6455ccbe55464047b94702b1e2f5c62a">Loop</label> |
| 381 | ···········<input·type="radio"·name="state"·value="reflect"·id="_anim_radio3_ | 381 | ···········<input·type="radio"·name="state"·value="reflect"·id="_anim_radio3_6455ccbe55464047b94702b1e2f5c62a" |
| 382 | ··················> | 382 | ··················> |
| 383 | ···········<label·for="_anim_radio3_ | 383 | ···········<label·for="_anim_radio3_6455ccbe55464047b94702b1e2f5c62a">Reflect</label> |
| 384 | ·········</form> | 384 | ·········</form> |
| 385 | ·······</div> | 385 | ·······</div> |
| 386 | ·····</div> | 386 | ·····</div> |
| 387 | ·····<script·language="javascript"> | 387 | ·····<script·language="javascript"> |
| 388 | ·······/*·Instantiate·the·Animation·class.·*/ | 388 | ·······/*·Instantiate·the·Animation·class.·*/ |
| 389 | ·······/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ | 389 | ·······/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ |
| 390 | ·······(function()·{ | 390 | ·······(function()·{ |
| 391 | ·········var·img_id·=·"_anim_img07c18edf426e47cb8fbf7c7d19ed8fa0"; | ||
| 392 | ·········var·slider_id·=·"_anim_slider07c18edf426e47cb8fbf7c7d19ed8fa0"; | ||
| 393 | ·········var· | 391 | ·········var·img_id·=·"_anim_img6455ccbe55464047b94702b1e2f5c62a"; |
| 392 | ·········var·slider_id·=·"_anim_slider6455ccbe55464047b94702b1e2f5c62a"; | ||
| 393 | ·········var·loop_select_id·=·"_anim_loop_select6455ccbe55464047b94702b1e2f5c62a"; | ||
| 394 | ·········var·frames·=·new·Array(12); | 394 | ·········var·frames·=·new·Array(12); |
| 395 | ···· | 395 | ···· |
| 396 | ·······frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ | 396 | ·······frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ |
| 397 | ·····bGliIHZlcnNpb24zLjEwLjcrZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvhF0PpwAAAAlw\ | 397 | ·····bGliIHZlcnNpb24zLjEwLjcrZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvhF0PpwAAAAlw\ |
| 398 | ·····SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ | 398 | ·····SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ |
| 399 | ·····MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ | 399 | ·····MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ |
| 400 | ·····CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ | 400 | ·····CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ |
| Offset 2924, 15 lines modified | Offset 2924, 15 lines modified | ||
| 2924 | ·····AABMhgAIAABgMv8HiVg4h3Ra3U0AAAAASUVORK5CYII=\ | 2924 | ·····AABMhgAIAABgMv8HiVg4h3Ra3U0AAAAASUVORK5CYII=\ |
| 2925 | ·····" | 2925 | ·····" |
| 2926 | ·········/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before | 2926 | ·········/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before |
| 2927 | ············the·object·is·initialized.·*/ | 2927 | ············the·object·is·initialized.·*/ |
| 2928 | ·········setTimeout(function()·{ | 2928 | ·········setTimeout(function()·{ |
| 2929 | ·············anim | 2929 | ·············anim6455ccbe55464047b94702b1e2f5c62a·=·new·Animation(frames,·img_id,·slider_id,·500.0, |
| 2930 | ······································loop_select_id); | 2930 | ······································loop_select_id); |
| 2931 | ·········},·0); | 2931 | ·········},·0); |
| 2932 | ·······})() | 2932 | ·······})() |
| 2933 | ·····</script> | 2933 | ·····</script> |
| Offset 2949, 15 lines modified | Offset 2949, 15 lines modified | ||
| 2949 | ···example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient | 2949 | ···example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient |
| 2950 | ···approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn | 2950 | ···approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn |
| 2951 | ···the·combination·of·igraph·and·matplotlib. | 2951 | ···the·combination·of·igraph·and·matplotlib. |
| 2952 | ..·rst-class::·sphx-glr-timing | 2952 | ..·rst-class::·sphx-glr-timing |
| 2953 | ···**Total·running·time·of·the·script:**·(0·minutes· | 2953 | ···**Total·running·time·of·the·script:**·(0·minutes·5.690·seconds) |
| 2954 | ..·_sphx_glr_download_tutorials_ring_animation.py: | 2954 | ..·_sphx_glr_download_tutorials_ring_animation.py: |
| 2955 | ..·only::·html | 2955 | ..·only::·html |
| 2956 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 2956 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 41, 15 lines modified | Offset 41, 15 lines modified | ||
| 41 | oOnce·oLoop·oReflect | 41 | oOnce·oLoop·oReflect |
| 42 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·85-93·..·note::·We·use·*igraph*'s·:meth: | 42 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·85-93·..·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·5.690·seconds)·..·_sphx_glr_ |
| 49 | download_tutorials_ring_animation.py:·..·only::·html·..·container::·sphx-glr- | 49 | download_tutorials_ring_animation.py:·..·only::·html·..·container::·sphx-glr- |
| 50 | footer·sphx-glr-footer-example·..·container::·sphx-glr-download·sphx-glr- | 50 | footer·sphx-glr-footer-example·..·container::·sphx-glr-download·sphx-glr- |
| 51 | download-jupyter·:download:`Download·Jupyter·notebook:·ring_animation.ipynb·` | 51 | 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 187, 15 lines modified | Offset 187, 15 lines modified | ||
| 187 | ..·rst-class::·sphx-glr-timing | 187 | ..·rst-class::·sphx-glr-timing |
| 188 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 188 | ···**Total·running·time·of·the·script:**·(0·minutes·0.150·seconds) |
| 189 | ..·_sphx_glr_download_tutorials_shortest_path_visualisation.py: | 189 | ..·_sphx_glr_download_tutorials_shortest_path_visualisation.py: |
| 190 | ..·only::·html | 190 | ..·only::·html |
| 191 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 191 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 91, 15 lines modified | Offset 91, 15 lines modified | ||
| 91 | ..·rst-class::·sphx-glr-script-out | 91 | ..·rst-class::·sphx-glr-script-out |
| 92 | ·..·code-block::·none | 92 | ·..·code-block::·none |
| 93 | ····<igraph.Graph·object·at·0x7f | 93 | ····<igraph.Graph·object·at·0x7f3ec0b36d50> |
| 94 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·41-43 | 94 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·41-43 |
| 95 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let's | 95 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let's |
| 96 | choose·a·consistent·visual·style: | 96 | choose·a·consistent·visual·style: |
| Offset 180, 15 lines modified | Offset 180, 15 lines modified | ||
| 180 | ..·rst-class::·sphx-glr-timing | 180 | ..·rst-class::·sphx-glr-timing |
| 181 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 181 | ···**Total·running·time·of·the·script:**·(0·minutes·0.258·seconds) |
| 182 | ..·_sphx_glr_download_tutorials_simplify.py: | 182 | ..·_sphx_glr_download_tutorials_simplify.py: |
| 183 | ..·only::·html | 183 | ..·only::·html |
| 184 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 184 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 156, 15 lines modified | Offset 156, 15 lines modified | ||
| 156 | ..·note:: | 156 | ..·note:: |
| 157 | ··To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, | 157 | ··To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, |
| 158 | ··you·can·call·`ax.invert_yaxis()`·before·`plt.show()`. | 158 | ··you·can·call·`ax.invert_yaxis()`·before·`plt.show()`. |
| 159 | ..·rst-class::·sphx-glr-timing | 159 | ..·rst-class::·sphx-glr-timing |
| 160 | ···**Total·running·time·of·the·script:**·(0·minutes· | 160 | ···**Total·running·time·of·the·script:**·(0·minutes·0.633·seconds) |
| 161 | ..·_sphx_glr_download_tutorials_spanning_trees.py: | 161 | ..·_sphx_glr_download_tutorials_spanning_trees.py: |
| 162 | ..·only::·html | 162 | ..·only::·html |
| 163 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 163 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 312, 15 lines modified | Offset 312, 15 lines modified | ||
| 312 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·171-172 | 312 | ..·GENERATED·FROM·PYTHON·SOURCE·LINES·171-172 |
| 313 | ..·[1]·W.·Zachary:·"An·Information·Flow·Model·for·Conflict·and·Fission·in·Small·Groups".·Journal·of·Anthropological·Research·33,·no.·4·(1977):·452–73.·https://www.jstor.org/stable/3629752 | 313 | ..·[1]·W.·Zachary:·"An·Information·Flow·Model·for·Conflict·and·Fission·in·Small·Groups".·Journal·of·Anthropological·Research·33,·no.·4·(1977):·452–73.·https://www.jstor.org/stable/3629752 |
| 314 | ..·rst-class::·sphx-glr-timing | 314 | ..·rst-class::·sphx-glr-timing |
| 315 | ···**Total·running·time·of·the·script:**·(0·minutes· | 315 | ···**Total·running·time·of·the·script:**·(0·minutes·2.150·seconds) |
| 316 | ..·_sphx_glr_download_tutorials_stochastic_variability.py: | 316 | ..·_sphx_glr_download_tutorials_stochastic_variability.py: |
| 317 | ..·only::·html | 317 | ..·only::·html |
| 318 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 318 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 180, 15 lines modified | Offset 180, 15 lines modified | ||
| 180 | ..·rst-class::·sphx-glr-timing | 180 | ..·rst-class::·sphx-glr-timing |
| 181 | ···**Total·running·time·of·the·script:**·(0·minutes·0. | 181 | ···**Total·running·time·of·the·script:**·(0·minutes·0.156·seconds) |
| 182 | ..·_sphx_glr_download_tutorials_topological_sort.py: | 182 | ..·_sphx_glr_download_tutorials_topological_sort.py: |
| 183 | ..·only::·html | 183 | ..·only::·html |
| 184 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 184 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 213, 15 lines modified | Offset 213, 15 lines modified | ||
| 213 | ..·rst-class::·sphx-glr-timing | 213 | ..·rst-class::·sphx-glr-timing |
| 214 | ···**Total·running·time·of·the·script:**·(0·minutes· | 214 | ···**Total·running·time·of·the·script:**·(0·minutes·4.052·seconds) |
| 215 | ..·_sphx_glr_download_tutorials_visual_style.py: | 215 | ..·_sphx_glr_download_tutorials_visual_style.py: |
| 216 | ..·only::·html | 216 | ..·only::·html |
| 217 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 217 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 157, 15 lines modified | Offset 157, 15 lines modified | ||
| 157 | ..·rst-class::·sphx-glr-timing | 157 | ..·rst-class::·sphx-glr-timing |
| 158 | ···**Total·running·time·of·the·script:**·(0·minutes· | 158 | ···**Total·running·time·of·the·script:**·(0·minutes·13.758·seconds) |
| 159 | ..·_sphx_glr_download_tutorials_visualize_cliques.py: | 159 | ..·_sphx_glr_download_tutorials_visualize_cliques.py: |
| 160 | ..·only::·html | 160 | ..·only::·html |
| 161 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 161 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 155, 15 lines modified | Offset 155, 15 lines modified | ||
| 155 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, | 155 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, |
| 156 | check·out·:ref:`tutorials-cluster-graph`. | 156 | check·out·:ref:`tutorials-cluster-graph`. |
| 157 | ..·rst-class::·sphx-glr-timing | 157 | ..·rst-class::·sphx-glr-timing |
| 158 | ···**Total·running·time·of·the·script:**·(0·minutes· | 158 | ···**Total·running·time·of·the·script:**·(0·minutes·0.682·seconds) |
| 159 | ..·_sphx_glr_download_tutorials_visualize_communities.py: | 159 | ..·_sphx_glr_download_tutorials_visualize_communities.py: |
| 160 | ..·only::·html | 160 | ..·only::·html |
| 161 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example | 161 | ··..·container::·sphx-glr-footer·sphx-glr-footer-example |
| Offset 461, 132 lines modified | Offset 461, 130 lines modified | ||
| 461 | ········"":·[0,·6,·7,·8,·10,·11,·12,·13,·14,·15,·16,·18,·25,·26,·28,·29,·30,·32,·34,·35,·36], | 461 | ········"":·[0,·6,·7,·8,·10,·11,·12,·13,·14,·15,·16,·18,·25,·26,·28,·29,·30,·32,·34,·35,·36], |
| 462 | ········"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,·37], | 462 | ········"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,·37], |
| 463 | ········"000":·7, | 463 | ········"000":·7, |
| 464 | ········"0088ff":·[7,·8], | 464 | ········"0088ff":·[7,·8], |
| 465 | ········"01":·[7,·8], | 465 | ········"01":·[7,·8], |
| 466 | ········"02":·[7,·8], | 466 | ········"02":·[7,·8], |
| 467 | ········"05":·[7,·8], | 467 | ········"05":·[7,·8], |
| 468 | ········"052":·34, | ||
| 468 | ········"08f":·[7,·8], | 469 | ········"08f":·[7,·8], |
| 469 | ········"0x7f | 470 | ········"0x7f3eaf8af550":·18, |
| 470 | ········"0x7f | 471 | ········"0x7f3ebc0c7390":·11, |
| 471 | ········"0x7f | 472 | ········"0x7f3ec0b36d50":·30, |
| 472 | ········"1":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·15,·16,·1 | 473 | ········"1":·[0,·4,·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,·37], |
| 473 | ········"10":·[0,·4,·5,·7,·8,·10,·12,·13,·14,·15,·25,·28,·32], | 474 | ········"10":·[0,·4,·5,·7,·8,·10,·12,·13,·14,·15,·25,·28,·32], |
| 474 | ········"100":·[0,·7,·8,·14,·16,·18,·32,·36,·37], | 475 | ········"100":·[0,·7,·8,·14,·16,·18,·32,·36,·37], |
| 475 | ········"10000":·8, | 476 | ········"10000":·8, |
| 476 | ········"11":·[12,·13,·28], | 477 | ········"11":·[12,·13,·28], |
| 478 | ········"111":·10, | ||
| 477 | ········"111223":·4, | 479 | ········"111223":·4, |
| 478 | ········"112222":·4, | 480 | ········"112222":·4, |
| 479 | ········"12":·[7,·8,·13,·28,·32], | 481 | ········"12":·[7,·8,·13,·28,·32], |
| 480 | ········"1205":·[7,·8], | 482 | ········"1205":·[7,·8], |
| 481 | ········"1252":·[4,·27], | 483 | ········"1252":·[4,·27], |
| 482 | ········"126":·[7,·8], | 484 | ········"126":·[7,·8,·26], |
| 483 | ········"127":·[7,·8], | 485 | ········"127":·[7,·8], |
| 484 | ········"13":·[13,·27], | 486 | ········"13":·[13,·27,·35], |
| 485 | ········"136":·24, | 487 | ········"136":·24, |
| 488 | ········"139":·23, | ||
| 486 | ········"14":·[10,·13], | 489 | ········"14":·[10,·13], |
| 487 | ········"15":·[7,·8,·14,·16,·17,·19,·20,·22,·34], | 490 | ········"15":·[7,·8,·14,·16,·17,·19,·20,·22,·34], |
| 491 | ········"150":·[10,·29,·32], | ||
| 488 | ········"15 | 492 | ········"156":·33, |
| 489 | ········"16":·10, | 493 | ········"16":·10, |
| 490 | ········"1695":·5, | 494 | ········"1695":·5, |
| 491 | ········"18":·[7,·8,·19,·26], | 495 | ········"18":·[7,·8,·19,·26], |
| 496 | ········"189":·27, | ||
| 492 | ········"1977":·32, | 497 | ········"1977":·32, |
| 498 | ········"199":·11, | ||
| 493 | ········"2":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·15,·18,·19,·22,·23,·25,·27,·28,·29,·30,·32,·33,·34,·37], | 499 | ········"2":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·15,·18,·19,·22,·23,·25,·27,·28,·29,·30,·32,·33,·34,·37], |
| 494 | ········"20":·[7,·8,·10,·14,·19,·24,·26,·30,·32,·34,·36,·37], | 500 | ········"20":·[7,·8,·10,·14,·19,·24,·26,·30,·32,·34,·36,·37], |
| 495 | ········"200":·[16,·17], | 501 | ········"200":·[16,·17], |
| 496 | ········"2006":·5, | 502 | ········"2006":·5, |
| 497 | ········"2009":·[7,·8], | 503 | ········"2009":·[7,·8], |
| 498 | ········"201":·24, | 504 | ········"201":·24, |
| 499 | ········"2021":·[7,·8], | 505 | ········"2021":·[7,·8], |
| 500 | ········"2022":·3, | 506 | ········"2022":·3, |
| 501 | ········"21":·19, | 507 | ········"21":·19, |
| 502 | ········"22":·[7,·8], | 508 | ········"22":·[7,·8], |
| 503 | ········"222":·20, | 509 | ········"222":·20, |
| 504 | ········"23":·[7,·8,·19], | 510 | ········"23":·[7,·8,·19], |
| 511 | ········"234":·12, | ||
| 505 | ········"2386714":·8, | 512 | ········"2386714":·8, |
| 506 | ········"25":·[7,·8,·22,·33], | 513 | ········"25":·[7,·8,·22,·33], |
| 507 | ········"255":·[7,·8,·14,·17,·34], | 514 | ········"255":·[7,·8,·14,·17,·34], |
| 508 | ········"263":·26, | ||
| 509 | ········"2 | 515 | ········"258":·30, |
| 510 | ········"270":·[7,·8], | 516 | ········"270":·[7,·8], |
| 511 | ········"28":·19, | 517 | ········"28":·19, |
| 512 | ········"28 | 518 | ········"281":·19, |
| 513 | ········"29":·[7,·8], | 519 | ········"29":·[7,·8], |
| 514 | ········"295":·29, | ||
| 515 | ········"2d":·[7,·8,·18,·28,·31,·37], | 520 | ········"2d":·[7,·8,·18,·28,·31,·37], |
| 516 | ········"2r09ej221sk2k5":·25, | 521 | ········"2r09ej221sk2k5":·25, |
| 517 | ········"3":·[0,·4,·6,·7,·8,·9,·10,·11,·12,·13,·14,·16,·18,·2 | 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,·35,·37], |
| 518 | ········"30":·[7,·8,·9,·11,·12,·13,·18,·20,·27,·32,·34], | 523 | ········"30":·[7,·8,·9,·11,·12,·13,·18,·20,·27,·32,·34], |
| 519 | ········"300":·[7,·8], | 524 | ········"300":·[7,·8], |
| 520 | ········"30745059034535":·10, | 525 | ········"30745059034535":·10, |
| 521 | ········"309":·14, | ||
| 522 | ········"31":·[7,·8], | 526 | ········"31":·[7,·8], |
| 523 | ········"313":·35, | ||
| 524 | ········"3203ejew332323":·25, | 527 | ········"3203ejew332323":·25, |
| 525 | ········"320eljl3lk3239":·25, | 528 | ········"320eljl3lk3239":·25, |
| 526 | ········"321":·23, | ||
| 527 | ········"33":·32, | 529 | ········"33":·32, |
| 528 | ········"34":·[7,·8], | 530 | ········"34":·[7,·8], |
| 529 | ········"35":·19, | 531 | ········"35":·19, |
| 530 | ········"3 | 532 | ········"36":·31, |
| 531 | ········"36":·[31,·35], | ||
| 532 | ········"3629752":·32, | 533 | ········"3629752":·32, |
| 533 | ········"369":·11, | ||
| 534 | ········"376":·[7,·8], | 534 | ········"376":·[7,·8], |
| 535 | ········"38":·22, | 535 | ········"38":·22, |
| 536 | ········"386":·24, | ||
| 537 | ········"3d":·[7,·8,·37], | 536 | ········"3d":·[7,·8,·37], |
| 538 | ········"4":·[0,·4,·7,·8,·9,·11,·12,·13,·14,·18,·22,·23,·2 | 537 | ········"4":·[0,·4,·7,·8,·9,·11,·12,·13,·14,·18,·22,·23,·27,·29,·30,·32,·33,·34,·35,·37], |
| 539 | ········"40":·26, | 538 | ········"40":·26, |
| 540 | ········"40m11919332msa":·25, | 539 | ········"40m11919332msa":·25, |
| 541 | ········"42":·32, | 540 | ········"42":·32, |
| 542 | ········"433":·25, | ||
| 543 | ········"44":·4, | 541 | ········"44":·4, |
| 544 | ········"45":·26, | 542 | ········"45":·26, |
| 545 | ········"452":·32, | 543 | ········"452":·32, |
| 546 | ········"458":·12, | ||
| 547 | ········"47":·[7,·8], | 544 | ········"47":·[7,·8], |
| 548 | ········"471":·30, | ||
| 549 | ········"477":·10, | 545 | ········"477":·10, |
| 550 | ········"494":·27, | 546 | ········"494":·27, |
| 551 | ········"4r4320dkqpdokk":·25, | 547 | ········"4r4320dkqpdokk":·25, |
| 552 | ········"5":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·15,·22,·23,·24,·26,·27,·28,·29,·31,·33,·34,·35,·37], | 548 | ········"5":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·15,·22,·23,·24,·26,·27,·28,·29,·31,·33,·34,·35,·37], |
| 553 | ········"50":·[7,·8,·10,·17], | 549 | ········"50":·[7,·8,·10,·17], |
| 554 | ········"500":·28, | 550 | ········"500":·28, |
| 551 | ········"508":·24, | ||
| 555 | ········"516":·[7,·8], | 552 | ········"516":·[7,·8], |
| 556 | ········"517":·6, | 553 | ········"517":·6, |
| 557 | ········"530":·31, | ||
| 558 | ········"555":·33, | ||
| 559 | ········"5 | 554 | ········"547":·22, |
| 560 | ········"5 | 555 | ········"557":·25, |
| 556 | ········"590":·13, | ||
| 561 | ········"6":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·23,·29,·31,·32], | 557 | ········"6":·[0,·7,·8,·9,·10,·11,·12,·13,·14,·23,·29,·31,·32], |
| 562 | ········"600":·[7,·8], | 558 | ········"600":·[7,·8], |
| 563 | ········"6 | 559 | ········"633":·31, |
| 564 | ········"65":·[22,·26], | 560 | ········"65":·[22,·26], |
| 565 | ········"652":·9, | ||
| 566 | ········"653":·10, | ||
| 567 | ········"666":·[13,·29], | ||
| 568 | ········"6 | 561 | ········"660":·20, |
| 562 | ········"666":·29, | ||
| 563 | ········"682":·36, | ||
| 569 | ········"69 | 564 | ········"690":·28, |
| 570 | ········"7":·[4,·7,·8,·9,·10,·11,·12,·13,·14,·17,·23,·27,·29,·32], | 565 | ········"7":·[4,·7,·8,·9,·10,·11,·12,·13,·14,·17,·23,·26,·27,·29,·32], |
| 571 | ········"7142cf":·27, | 566 | ········"7142cf":·27, |
| 567 | ········"718":·9, | ||
| 568 | ········"729":·16, | ||
| 572 | ········"73":·32, | 569 | ········"73":·32, |
| 573 | ········"753":·10, | 570 | ········"753":·10, |
| 571 | ········"758":·35, | ||
| Max diff block lines reached; 683/5306 bytes (12.87%) of diff not shown. | |||
| Offset 148, 15 lines modified | Offset 148, 15 lines modified | ||
| 148 | ····<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">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> |
| 149 | ····<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_width</span><span·class="o">=</span><span·class="mf">0.8</span><span·class="p">,</span> |
| 150 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"gray"</span><span·class="p">,</span> | 150 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"gray"</span><span·class="p">,</span> |
| 151 | <span·class="p">)</span> | 151 | <span·class="p">)</span> |
| 152 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 152 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 153 | </pre></div> | 153 | </pre></div> |
| 154 | </div> | 154 | </div> |
| 155 | <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. | 155 | <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.718·seconds)</p> |
| 156 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-articulation-points-py"> | 156 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-articulation-points-py"> |
| 157 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 157 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 158 | <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 | <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> |
| 159 | </div> | 159 | </div> |
| 160 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 160 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 161 | <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 | <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> |
| 162 | </div> | 162 | </div> |
| Offset 68, 15 lines modified | Offset 68, 15 lines modified | ||
| 68 | g.vs], | 68 | g.vs], |
| 69 | ····vertex_frame_width=[3·if·v·in·articulation_points·else·1·for·v·in·g.vs], | 69 | ····vertex_frame_width=[3·if·v·in·articulation_points·else·1·for·v·in·g.vs], |
| 70 | ····edge_width=0.8, | 70 | ····edge_width=0.8, |
| 71 | ····edge_color="gray", | 71 | ····edge_color="gray", |
| 72 | ) | 72 | ) |
| 73 | plt.show() | 73 | plt.show() |
| 74 | [articulation·points] | 74 | [articulation·points] |
| 75 | Total·running·time·of·the·script:·(0·minutes·0. | 75 | Total·running·time·of·the·script:·(0·minutes·0.718·seconds) |
| 76 | Download_Jupyter_notebook:_articulation_points.ipynb | 76 | Download_Jupyter_notebook:_articulation_points.ipynb |
| 77 | Download_Python_source_code:_articulation_points.py | 77 | Download_Python_source_code:_articulation_points.py |
| 78 | Download_zipped:_articulation_points.zip | 78 | Download_zipped:_articulation_points.zip |
| 79 | Gallery_generated_by_Sphinx-Gallery | 79 | Gallery_generated_by_Sphinx-Gallery |
| 80 | Previous | 80 | Previous |
| 81 | Next | 81 | Next |
| Offset 205, 15 lines modified | Offset 205, 15 lines modified | ||
| 205 | </div> | 205 | </div> |
| 206 | <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 | <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> |
| 207 | <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">edges</span><span·class="p">:</span>·<span·class="mf">1.5</span>·<span·class="o">-</span>·<span·class="mf">16.0</span> |
| 208 | <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">vertices</span><span·class="p">:</span>·<span·class="mf">0.0</span>·<span·class="o">-</span>·<span·class="mf">753.8235063912693</span> |
| 209 | <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 | <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> |
| 210 | </pre></div> | 210 | </pre></div> |
| 211 | </div> | 211 | </div> |
| 212 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 212 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·3.111·seconds)</p> |
| 213 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-betweenness-py"> | 213 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-betweenness-py"> |
| 214 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 214 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 215 | <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 | <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> |
| 216 | </div> | 216 | </div> |
| 217 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 217 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 218 | <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 | <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> |
| 219 | </div> | 219 | </div> |
| Offset 127, 15 lines modified | Offset 127, 15 lines modified | ||
| 127 | fig.tight_layout(h_pad=1) | 127 | fig.tight_layout(h_pad=1) |
| 128 | plt.show() | 128 | plt.show() |
| 129 | [betweenness] | 129 | [betweenness] |
| 130 | vertices:·0.0·-·14.0 | 130 | vertices:·0.0·-·14.0 |
| 131 | edges:·1.5·-·16.0 | 131 | edges:·1.5·-·16.0 |
| 132 | vertices:·0.0·-·753.8235063912693 | 132 | vertices:·0.0·-·753.8235063912693 |
| 133 | edges:·8.951984126984126·-·477.30745059034535 | 133 | edges:·8.951984126984126·-·477.30745059034535 |
| 134 | Total·running·time·of·the·script:·(0·minutes· | 134 | Total·running·time·of·the·script:·(0·minutes·3.111·seconds) |
| 135 | Download_Jupyter_notebook:_betweenness.ipynb | 135 | Download_Jupyter_notebook:_betweenness.ipynb |
| 136 | Download_Python_source_code:_betweenness.py | 136 | Download_Python_source_code:_betweenness.py |
| 137 | Download_zipped:_betweenness.zip | 137 | Download_zipped:_betweenness.zip |
| 138 | Gallery_generated_by_Sphinx-Gallery | 138 | Gallery_generated_by_Sphinx-Gallery |
| 139 | Previous | 139 | Previous |
| 140 | Next | 140 | Next |
| Offset 177, 18 lines modified | Offset 177, 18 lines modified | ||
| 177 | ····<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_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> |
| 178 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> | 178 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> |
| 179 | ····<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_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> |
| 180 | ····<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="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> |
| 181 | <span·class="p">)</span> | 181 | <span·class="p">)</span> |
| 182 | </pre></div> | 182 | </pre></div> |
| 183 | </div> | 183 | </div> |
| 184 | <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">0x7f | 184 | <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">0x7f3ebc0c7390</span><span·class="o">></span> |
| 185 | </pre></div> | 185 | </pre></div> |
| 186 | </div> | 186 | </div> |
| 187 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 187 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.199·seconds)</p> |
| 188 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bipartite-matching-py"> | 188 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bipartite-matching-py"> |
| 189 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 189 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 190 | <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 | <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> |
| 191 | </div> | 191 | </div> |
| 192 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 192 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 193 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b91a50f4a4f6f4db7b965cf323d29344/bipartite_matching.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.py</span></code></a></p> | 193 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/b91a50f4a4f6f4db7b965cf323d29344/bipartite_matching.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.py</span></code></a></p> |
| 194 | </div> | 194 | </div> |
| Offset 87, 16 lines modified | Offset 87, 16 lines modified | ||
| 87 | ····vertex_color="lightblue", | 87 | ····vertex_color="lightblue", |
| 88 | ····edge_width=[3·if·e.target·==·matching.match_of(e.source)·else·1.0·for·e·in | 88 | ····edge_width=[3·if·e.target·==·matching.match_of(e.source)·else·1.0·for·e·in |
| 89 | g.es], | 89 | g.es], |
| 90 | ····edge_color=["red"·if·e.target·==·matching.match_of(e.source)·else·"black" | 90 | ····edge_color=["red"·if·e.target·==·matching.match_of(e.source)·else·"black" |
| 91 | for·e·in·g.es] | 91 | for·e·in·g.es] |
| 92 | ) | 92 | ) |
| 93 | [bipartite·matching] | 93 | [bipartite·matching] |
| 94 | <igraph.drawing.matplotlib.graph.GraphArtist·object·at·0x7f | 94 | <igraph.drawing.matplotlib.graph.GraphArtist·object·at·0x7f3ebc0c7390> |
| 95 | Total·running·time·of·the·script:·(0·minutes·0. | 95 | Total·running·time·of·the·script:·(0·minutes·0.199·seconds) |
| 96 | Download_Jupyter_notebook:_bipartite_matching.ipynb | 96 | Download_Jupyter_notebook:_bipartite_matching.ipynb |
| 97 | Download_Python_source_code:_bipartite_matching.py | 97 | Download_Python_source_code:_bipartite_matching.py |
| 98 | Download_zipped:_bipartite_matching.zip | 98 | Download_zipped:_bipartite_matching.zip |
| 99 | Gallery_generated_by_Sphinx-Gallery | 99 | Gallery_generated_by_Sphinx-Gallery |
| 100 | Previous | 100 | Previous |
| 101 | Next | 101 | Next |
| Offset 189, 15 lines modified | Offset 189, 15 lines modified | ||
| 189 | ····<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_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> |
| 190 | ····<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">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> |
| 191 | ····<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="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> |
| 192 | <span·class="p">)</span> | 192 | <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_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. | 196 | <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.234·seconds)</p> |
| 197 | <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-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bipartite-matching-maxflow-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/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 | <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> |
| 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/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 | <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> |
| 203 | </div> | 203 | </div> |
| Offset 98, 15 lines modified | Offset 98, 15 lines modified | ||
| 98 | ····vertex_size=30, | 98 | ····vertex_size=30, |
| 99 | ····vertex_label=range(g.vcount()), | 99 | ····vertex_label=range(g.vcount()), |
| 100 | ····vertex_color=["lightblue"·if·i·<·9·else·"orange"·for·i·in·range(11)], | 100 | ····vertex_color=["lightblue"·if·i·<·9·else·"orange"·for·i·in·range(11)], |
| 101 | ····edge_width=[1.0·+·flow.flow[i]·for·i·in·range(g.ecount())], | 101 | ····edge_width=[1.0·+·flow.flow[i]·for·i·in·range(g.ecount())], |
| 102 | ) | 102 | ) |
| 103 | plt.show() | 103 | plt.show() |
| 104 | [bipartite·matching·maxflow] | 104 | [bipartite·matching·maxflow] |
| 105 | Total·running·time·of·the·script:·(0·minutes·0. | 105 | Total·running·time·of·the·script:·(0·minutes·0.234·seconds) |
| 106 | Download_Jupyter_notebook:_bipartite_matching_maxflow.ipynb | 106 | Download_Jupyter_notebook:_bipartite_matching_maxflow.ipynb |
| 107 | Download_Python_source_code:_bipartite_matching_maxflow.py | 107 | Download_Python_source_code:_bipartite_matching_maxflow.py |
| 108 | Download_zipped:_bipartite_matching_maxflow.zip | 108 | Download_zipped:_bipartite_matching_maxflow.zip |
| 109 | Gallery_generated_by_Sphinx-Gallery | 109 | Gallery_generated_by_Sphinx-Gallery |
| 110 | Previous | 110 | Previous |
| 111 | Next | 111 | Next |
| Offset 192, 15 lines modified | Offset 192, 15 lines modified | ||
| 192 | ····<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_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> |
| 193 | ····<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</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> |
| 194 | ····<span·class="n">edge_label_color</span><span·class="o">=</span><span·class="s2">"red"</span><span·class="p">,</span> | 194 | ····<span·class="n">edge_label_color</span><span·class="o">=</span><span·class="s2">"red"</span><span·class="p">,</span> |
| 195 | <span·class="p">)</span> | 195 | <span·class="p">)</span> |
| 196 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 196 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 197 | </pre></div> | 197 | </pre></div> |
| 198 | </div> | 198 | </div> |
| 199 | <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· | 199 | <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.590·seconds)</p> |
| 200 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bridges-py"> | 200 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-bridges-py"> |
| 201 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 201 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 202 | <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 | <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> |
| 203 | </div> | 203 | </div> |
| 204 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 204 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 205 | <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 | <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> |
| 206 | </div> | 206 | </div> |
| Offset 103, 15 lines modified | Offset 103, 15 lines modified | ||
| 103 | ····edge_background="#FFF0",··#·transparent·background·color | 103 | ····edge_background="#FFF0",··#·transparent·background·color |
| 104 | ····edge_align_label=True,··#·make·sure·labels·are·aligned·with·the·edge | 104 | ····edge_align_label=True,··#·make·sure·labels·are·aligned·with·the·edge |
| 105 | ····edge_label=g.es["label"], | 105 | ····edge_label=g.es["label"], |
| 106 | ····edge_label_color="red", | 106 | ····edge_label_color="red", |
| 107 | ) | 107 | ) |
| 108 | plt.show() | 108 | plt.show() |
| 109 | [bridges] | 109 | [bridges] |
| 110 | Total·running·time·of·the·script:·(0·minutes· | 110 | Total·running·time·of·the·script:·(0·minutes·0.590·seconds) |
| 111 | Download_Jupyter_notebook:_bridges.ipynb | 111 | Download_Jupyter_notebook:_bridges.ipynb |
| 112 | Download_Python_source_code:_bridges.py | 112 | Download_Python_source_code:_bridges.py |
| 113 | Download_zipped:_bridges.zip | 113 | Download_zipped:_bridges.zip |
| 114 | Gallery_generated_by_Sphinx-Gallery | 114 | Gallery_generated_by_Sphinx-Gallery |
| 115 | Previous | 115 | Previous |
| 116 | Next | 116 | Next |
| Offset 343, 15 lines modified | Offset 343, 15 lines modified | ||
| 343 | ····<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> | 343 | ····<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> |
| 344 | ····<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> | 344 | ····<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> |
| 345 | <span·class="p">)</span> | 345 | <span·class="p">)</span> |
| 346 | <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> | 346 | <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> |
| 347 | </pre></div> | 347 | </pre></div> |
| 348 | </div> | 348 | </div> |
| 349 | <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· | 349 | <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·2.995·seconds)</p> |
| 350 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-cluster-contraction-py"> | 350 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-cluster-contraction-py"> |
| 351 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 351 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 352 | <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> | 352 | <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> |
| 353 | </div> | 353 | </div> |
| 354 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 354 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 355 | <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> | 355 | <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> |
| 356 | </div> | 356 | </div> |
| Offset 242, 15 lines modified | Offset 242, 15 lines modified | ||
| 242 | ····title="Community:", | 242 | ····title="Community:", |
| 243 | ····bbox_to_anchor=(0,·1.0), | 243 | ····bbox_to_anchor=(0,·1.0), |
| 244 | ····bbox_transform=ax2.transAxes, | 244 | ····bbox_transform=ax2.transAxes, |
| 245 | ) | 245 | ) |
| 246 | fig2.set_size_inches(10,·10) | 246 | fig2.set_size_inches(10,·10) |
| 247 | [cluster·contraction] | 247 | [cluster·contraction] |
| 248 | Total·running·time·of·the·script:·(0·minutes· | 248 | Total·running·time·of·the·script:·(0·minutes·2.995·seconds) |
| 249 | Download_Jupyter_notebook:_cluster_contraction.ipynb | 249 | Download_Jupyter_notebook:_cluster_contraction.ipynb |
| 250 | Download_Python_source_code:_cluster_contraction.py | 250 | Download_Python_source_code:_cluster_contraction.py |
| 251 | Download_zipped:_cluster_contraction.zip | 251 | Download_zipped:_cluster_contraction.zip |
| 252 | Gallery_generated_by_Sphinx-Gallery | 252 | Gallery_generated_by_Sphinx-Gallery |
| 253 | Previous | 253 | Previous |
| 254 | Next | 254 | Next |
| Offset 186, 15 lines modified | Offset 186, 15 lines modified | ||
| 186 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> | 186 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> |
| 187 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"black"</span><span·class="p">,</span> | 187 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"black"</span><span·class="p">,</span> |
| 188 | <span·class="p">)</span> | 188 | <span·class="p">)</span> |
| 189 | <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="s2">"Complement·of·union·graph"</span><span·class="p">)</span> | 189 | <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="s2">"Complement·of·union·graph"</span><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_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· | 193 | <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.762·seconds)</p> |
| 194 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-complement-py"> | 194 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-complement-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/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 | <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> |
| 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/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 | <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> |
| 200 | </div> | 200 | </div> |
| Offset 97, 15 lines modified | Offset 97, 15 lines modified | ||
| 97 | ····target=axs[1,·1], | 97 | ····target=axs[1,·1], |
| 98 | ····layout="circle", | 98 | ····layout="circle", |
| 99 | ····vertex_color="black", | 99 | ····vertex_color="black", |
| 100 | ) | 100 | ) |
| 101 | axs[1,·1].set_title("Complement·of·union·graph") | 101 | axs[1,·1].set_title("Complement·of·union·graph") |
| 102 | plt.show() | 102 | plt.show() |
| 103 | [Original·graph,·Complement·graph,·Union·graph,·Complement·of·union·graph] | 103 | [Original·graph,·Complement·graph,·Union·graph,·Complement·of·union·graph] |
| 104 | Total·running·time·of·the·script:·(0·minutes· | 104 | Total·running·time·of·the·script:·(0·minutes·0.762·seconds) |
| 105 | Download_Jupyter_notebook:_complement.ipynb | 105 | Download_Jupyter_notebook:_complement.ipynb |
| 106 | Download_Python_source_code:_complement.py | 106 | Download_Python_source_code:_complement.py |
| 107 | Download_zipped:_complement.zip | 107 | Download_zipped:_complement.zip |
| 108 | Gallery_generated_by_Sphinx-Gallery | 108 | Gallery_generated_by_Sphinx-Gallery |
| 109 | Previous | 109 | Previous |
| 110 | Next | 110 | Next |
| Offset 166, 15 lines modified | Offset 166, 15 lines modified | ||
| 166 | import·igraph·and·then·call·<code·class="docutils·literal·notranslate"><span·class="pre">ig.config.load("./path/to/config/file")</span></code></p> | 166 | import·igraph·and·then·call·<code·class="docutils·literal·notranslate"><span·class="pre">ig.config.load("./path/to/config/file")</span></code></p> |
| 167 | </div> | 167 | </div> |
| 168 | <div·class="admonition·note"> | 168 | <div·class="admonition·note"> |
| 169 | <p·class="admonition-title">Note</p> | 169 | <p·class="admonition-title">Note</p> |
| 170 | <p>To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, | 170 | <p>To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes, |
| 171 | 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> | 171 | 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 | </div> | 172 | </div> |
| 173 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 173 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·1.729·seconds)</p> |
| 174 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-configuration-py"> | 174 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-configuration-py"> |
| 175 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 175 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 176 | <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> | 176 | <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 | </div> | 177 | </div> |
| 178 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 178 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 179 | <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> | 179 | <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 | </div> | 180 | </div> |
| Offset 79, 15 lines modified | Offset 79, 15 lines modified | ||
| 79 | Note | 79 | Note |
| 80 | You·can·have·multiple·config·files:·specify·each·location·via·ig.config.save | 80 | You·can·have·multiple·config·files:·specify·each·location·via·ig.config.save |
| 81 | ("./path/to/config/file").·To·load·a·specific·config,·import·igraph·and·then | 81 | ("./path/to/config/file").·To·load·a·specific·config,·import·igraph·and·then |
| 82 | call·ig.config.load("./path/to/config/file") | 82 | call·ig.config.load("./path/to/config/file") |
| 83 | Note | 83 | Note |
| 84 | To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes,·colors, | 84 | To·use·a·consistent·style·between·individual·plots·(e.g.·vertex·sizes,·colors, |
| 85 | layout·etc.)·check·out·Visual_styling. | 85 | layout·etc.)·check·out·Visual_styling. |
| 86 | Total·running·time·of·the·script:·(0·minutes· | 86 | Total·running·time·of·the·script:·(0·minutes·1.729·seconds) |
| 87 | Download_Jupyter_notebook:_configuration.ipynb | 87 | Download_Jupyter_notebook:_configuration.ipynb |
| 88 | Download_Python_source_code:_configuration.py | 88 | Download_Python_source_code:_configuration.py |
| 89 | Download_zipped:_configuration.zip | 89 | Download_zipped:_configuration.zip |
| 90 | Gallery_generated_by_Sphinx-Gallery | 90 | Gallery_generated_by_Sphinx-Gallery |
| 91 | Previous | 91 | Previous |
| 92 | Next | 92 | Next |
| Offset 154, 15 lines modified | Offset 154, 15 lines modified | ||
| 154 | </div> | 154 | </div> |
| 155 | <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 | <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"> |
| 156 | <p·class="admonition-title">Note</p> | 156 | <p·class="admonition-title">Note</p> |
| 157 | <p>We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex | 157 | <p>We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex |
| 158 | colors,·since·255·in·the·<a·class="reference·external"·href="/en/latest/api/igraph.drawing.colors.RainbowPalette.html"·title="(in·igraph·v1.0.0)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">igraph.drawing.colors.RainbowPalette</span></code></a> | 158 | colors,·since·255·in·the·<a·class="reference·external"·href="/en/latest/api/igraph.drawing.colors.RainbowPalette.html"·title="(in·igraph·v1.0.0)"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">igraph.drawing.colors.RainbowPalette</span></code></a> |
| 159 | corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues.</p> | 159 | corresponds·to·looping·back·to·red.·This·gives·us·nicely·distinct·hues.</p> |
| 160 | </div> | 160 | </div> |
| 161 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 161 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.868·seconds)</p> |
| 162 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-connected-components-py"> | 162 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-connected-components-py"> |
| 163 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 163 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 164 | <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 | <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> |
| 165 | </div> | 165 | </div> |
| 166 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 166 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 167 | <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 | <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> |
| 168 | </div> | 168 | </div> |
| Offset 71, 15 lines modified | Offset 71, 15 lines modified | ||
| 71 | ) | 71 | ) |
| 72 | plt.show() | 72 | plt.show() |
| 73 | [connected·components] | 73 | [connected·components] |
| 74 | Note | 74 | Note |
| 75 | We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex·colors, | 75 | We·use·the·integers·from·0·to·200·instead·of·0·to·255·in·our·vertex·colors, |
| 76 | since·255·in·the·igraph.drawing.colors.RainbowPalette·corresponds·to·looping | 76 | since·255·in·the·igraph.drawing.colors.RainbowPalette·corresponds·to·looping |
| 77 | back·to·red.·This·gives·us·nicely·distinct·hues. | 77 | back·to·red.·This·gives·us·nicely·distinct·hues. |
| 78 | Total·running·time·of·the·script:·(0·minutes· | 78 | Total·running·time·of·the·script:·(0·minutes·0.868·seconds) |
| 79 | Download_Jupyter_notebook:_connected_components.ipynb | 79 | Download_Jupyter_notebook:_connected_components.ipynb |
| 80 | Download_Python_source_code:_connected_components.py | 80 | Download_Python_source_code:_connected_components.py |
| 81 | Download_zipped:_connected_components.zip | 81 | Download_zipped:_connected_components.zip |
| 82 | Gallery_generated_by_Sphinx-Gallery | 82 | Gallery_generated_by_Sphinx-Gallery |
| 83 | Previous | 83 | Previous |
| 84 | Next | 84 | Next |
| Offset 161, 15 lines modified | Offset 161, 15 lines modified | ||
| 161 | </div> | 161 | </div> |
| 162 | <p>Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some | 162 | <p>Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some |
| 163 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those | 163 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those |
| 164 | multiedges,·keeping·each·side·only·once:</p> | 164 | multiedges,·keeping·each·side·only·once:</p> |
| 165 | <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 | <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> |
| 166 | </pre></div> | 166 | </pre></div> |
| 167 | </div> | 167 | </div> |
| 168 | <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">0x7f | 168 | <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">0x7f3eaf8af550</span><span·class="o">></span> |
| 169 | </pre></div> | 169 | </pre></div> |
| 170 | </div> | 170 | </div> |
| 171 | <p>Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks | 171 | <p>Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks |
| 172 | like:</p> | 172 | like:</p> |
| 173 | <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 | <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> |
| 174 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span> | 174 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</span><span·class="p">(</span> |
| 175 | ····<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> | 175 | ····<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 213, 15 lines modified | Offset 213, 15 lines modified | ||
| 213 | ····<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_width</span><span·class="o">=</span><span·class="mf">0.2</span><span·class="p">,</span> |
| 214 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> | 214 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> |
| 215 | <span·class="p">)</span> | 215 | <span·class="p">)</span> |
| 216 | <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">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> |
| 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_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· | 220 | <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.879·seconds)</p> |
| 221 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-delaunay-triangulation-py"> | 221 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-delaunay-triangulation-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/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 | <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> |
| 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/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 | <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> |
| 227 | </div> | 227 | </div> |
| Offset 73, 15 lines modified | Offset 73, 15 lines modified | ||
| 73 | ········(tri[1],·tri[2]), | 73 | ········(tri[1],·tri[2]), |
| 74 | ········(tri[0],·tri[2]), | 74 | ········(tri[0],·tri[2]), |
| 75 | ····]) | 75 | ····]) |
| 76 | Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some | 76 | Because·adjacent·triangles·share·an·edge/side,·the·graph·now·contains·some |
| 77 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those | 77 | edges·more·than·once.·It’s·useful·to·simplify·the·graph·to·get·rid·of·those |
| 78 | multiedges,·keeping·each·side·only·once: | 78 | multiedges,·keeping·each·side·only·once: |
| 79 | g.simplify() | 79 | g.simplify() |
| 80 | <igraph.Graph·object·at·0x7f | 80 | <igraph.Graph·object·at·0x7f3eaf8af550> |
| 81 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks | 81 | Finally,·plotting·the·graph·gives·a·good·idea·of·what·the·triangulation·looks |
| 82 | like: | 82 | like: |
| 83 | fig,·ax·=·plt.subplots() | 83 | fig,·ax·=·plt.subplots() |
| 84 | ig.plot( | 84 | ig.plot( |
| 85 | ····g, | 85 | ····g, |
| 86 | ····layout=layout, | 86 | ····layout=layout, |
| 87 | ····target=ax, | 87 | ····target=ax, |
| Offset 116, 15 lines modified | Offset 116, 15 lines modified | ||
| 116 | ····vertex_size=0, | 116 | ····vertex_size=0, |
| 117 | ····edge_width=0.2, | 117 | ····edge_width=0.2, |
| 118 | ····edge_color="white", | 118 | ····edge_color="white", |
| 119 | ) | 119 | ) |
| 120 | ax.set(xlim=(0,·1),·ylim=(0,·1)) | 120 | ax.set(xlim=(0,·1),·ylim=(0,·1)) |
| 121 | plt.show() | 121 | plt.show() |
| 122 | [delaunay·triangulation] | 122 | [delaunay·triangulation] |
| 123 | Total·running·time·of·the·script:·(0·minutes· | 123 | Total·running·time·of·the·script:·(0·minutes·0.879·seconds) |
| 124 | Download_Jupyter_notebook:_delaunay-triangulation.ipynb | 124 | Download_Jupyter_notebook:_delaunay-triangulation.ipynb |
| 125 | Download_Python_source_code:_delaunay-triangulation.py | 125 | Download_Python_source_code:_delaunay-triangulation.py |
| 126 | Download_zipped:_delaunay-triangulation.zip | 126 | Download_zipped:_delaunay-triangulation.zip |
| 127 | Gallery_generated_by_Sphinx-Gallery | 127 | Gallery_generated_by_Sphinx-Gallery |
| 128 | Previous | 128 | Previous |
| 129 | Next | 129 | Next |
| Offset 176, 15 lines modified | Offset 176, 15 lines modified | ||
| 176 | <span·class="c1">#·N·edges</span> | 176 | <span·class="c1">#·N·edges</span> |
| 177 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</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="n">target</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="mi">0</span><span·class="p">],</span>·<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span>·<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span>·<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">)</span> | 177 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</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="n">target</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="mi">0</span><span·class="p">],</span>·<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span>·<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span>·<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">)</span> |
| 178 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</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">g4</span></a><span·class="p">,</span>·<span·class="n">target</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="mi">1</span><span·class="p">],</span>·<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span>·<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span>·<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">)</span> | 178 | <span·class="n">ig</span><span·class="o">.</span><span·class="n">plot</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">g4</span></a><span·class="p">,</span>·<span·class="n">target</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="mi">1</span><span·class="p">],</span>·<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span>·<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span>·<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">)</span> |
| 179 | <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="s2">"N.·edges"</span><span·class="p">)</span> | 179 | <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="s2">"N.·edges"</span><span·class="p">)</span> |
| 180 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 180 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 181 | </pre></div> | 181 | </pre></div> |
| 182 | </div> | 182 | </div> |
| 183 | <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· | 183 | <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·1.281·seconds)</p> |
| 184 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-erdos-renyi-py"> | 184 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-erdos-renyi-py"> |
| 185 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 185 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 186 | <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> | 186 | <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> |
| 187 | </div> | 187 | </div> |
| 188 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 188 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 189 | <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> | 189 | <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> |
| 190 | </div> | 190 | </div> |
| Offset 90, 15 lines modified | Offset 90, 15 lines modified | ||
| 90 | ig.plot(g3,·target=axs[1,·0],·layout="circle",·vertex_color="lightblue", | 90 | ig.plot(g3,·target=axs[1,·0],·layout="circle",·vertex_color="lightblue", |
| 91 | vertex_size=15) | 91 | vertex_size=15) |
| 92 | ig.plot(g4,·target=axs[1,·1],·layout="circle",·vertex_color="lightblue", | 92 | ig.plot(g4,·target=axs[1,·1],·layout="circle",·vertex_color="lightblue", |
| 93 | vertex_size=15) | 93 | vertex_size=15) |
| 94 | axs[1,·0].set_ylabel("N.·edges") | 94 | axs[1,·0].set_ylabel("N.·edges") |
| 95 | plt.show() | 95 | plt.show() |
| 96 | [erdos·renyi] | 96 | [erdos·renyi] |
| 97 | Total·running·time·of·the·script:·(0·minutes· | 97 | Total·running·time·of·the·script:·(0·minutes·1.281·seconds) |
| 98 | Download_Jupyter_notebook:_erdos_renyi.ipynb | 98 | Download_Jupyter_notebook:_erdos_renyi.ipynb |
| 99 | Download_Python_source_code:_erdos_renyi.py | 99 | Download_Python_source_code:_erdos_renyi.py |
| 100 | Download_zipped:_erdos_renyi.zip | 100 | Download_zipped:_erdos_renyi.zip |
| 101 | Gallery_generated_by_Sphinx-Gallery | 101 | Gallery_generated_by_Sphinx-Gallery |
| 102 | Previous | 102 | Previous |
| 103 | Next | 103 | Next |
| Offset 156, 15 lines modified | Offset 156, 15 lines modified | ||
| 156 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"grey"</span><span·class="p">,</span> | 156 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"grey"</span><span·class="p">,</span> |
| 157 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"#222"</span><span·class="p">,</span> | 157 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"#222"</span><span·class="p">,</span> |
| 158 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span> | 158 | ····<span·class="n">edge_width</span><span·class="o">=</span><span·class="mi">1</span><span·class="p">,</span> |
| 159 | <span·class="p">)</span> | 159 | <span·class="p">)</span> |
| 160 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 160 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 161 | </pre></div> | 161 | </pre></div> |
| 162 | </div> | 162 | </div> |
| 163 | <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· | 163 | <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.660·seconds)</p> |
| 164 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-generate-dag-py"> | 164 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-generate-dag-py"> |
| 165 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 165 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 166 | <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 | <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> |
| 167 | </div> | 167 | </div> |
| 168 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 168 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 169 | <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 | <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> |
| 170 | </div> | 170 | </div> |
| Offset 71, 15 lines modified | Offset 71, 15 lines modified | ||
| 71 | ····vertex_size=15, | 71 | ····vertex_size=15, |
| 72 | ····vertex_color="grey", | 72 | ····vertex_color="grey", |
| 73 | ····edge_color="#222", | 73 | ····edge_color="#222", |
| 74 | ····edge_width=1, | 74 | ····edge_width=1, |
| 75 | ) | 75 | ) |
| 76 | plt.show() | 76 | plt.show() |
| 77 | [generate·dag] | 77 | [generate·dag] |
| 78 | Total·running·time·of·the·script:·(0·minutes· | 78 | Total·running·time·of·the·script:·(0·minutes·0.660·seconds) |
| 79 | Download_Jupyter_notebook:_generate_dag.ipynb | 79 | Download_Jupyter_notebook:_generate_dag.ipynb |
| 80 | Download_Python_source_code:_generate_dag.py | 80 | Download_Python_source_code:_generate_dag.py |
| 81 | Download_zipped:_generate_dag.zip | 81 | Download_zipped:_generate_dag.zip |
| 82 | Gallery_generated_by_Sphinx-Gallery | 82 | Gallery_generated_by_Sphinx-Gallery |
| 83 | Previous | 83 | Previous |
| 84 | Next | 84 | Next |
| Offset 204, 15 lines modified | Offset 204, 15 lines modified | ||
| 204 | ····<span·class="n">fontsize</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">,</span> | 204 | ····<span·class="n">fontsize</span><span·class="o">=</span><span·class="mi">15</span><span·class="p">,</span> |
| 205 | ····<span·class="n">ha</span><span·class="o">=</span><span·class="s2">"center"</span><span·class="p">,</span> | 205 | ····<span·class="n">ha</span><span·class="o">=</span><span·class="s2">"center"</span><span·class="p">,</span> |
| 206 | ····<span·class="n">va</span><span·class="o">=</span><span·class="s2">"center"</span><span·class="p">,</span> | 206 | ····<span·class="n">va</span><span·class="o">=</span><span·class="s2">"center"</span><span·class="p">,</span> |
| 207 | <span·class="p">)</span> | 207 | <span·class="p">)</span> |
| 208 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 208 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 209 | </pre></div> | 209 | </pre></div> |
| 210 | </div> | 210 | </div> |
| 211 | <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· | 211 | <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·2.547·seconds)</p> |
| 212 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-isomorphism-py"> | 212 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-isomorphism-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/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> | 214 | <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> |
| 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/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> | 217 | <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> |
| 218 | </div> | 218 | </div> |
| Offset 117, 15 lines modified | Offset 117, 15 lines modified | ||
| 117 | ····"$\\simeq$"·if·g2.isomorphic(g3)·else·"$\\neq$", | 117 | ····"$\\simeq$"·if·g2.isomorphic(g3)·else·"$\\neq$", |
| 118 | ····fontsize=15, | 118 | ····fontsize=15, |
| 119 | ····ha="center", | 119 | ····ha="center", |
| 120 | ····va="center", | 120 | ····va="center", |
| 121 | ) | 121 | ) |
| 122 | plt.show() | 122 | plt.show() |
| 123 | [isomorphism] | 123 | [isomorphism] |
| 124 | Total·running·time·of·the·script:·(0·minutes· | 124 | Total·running·time·of·the·script:·(0·minutes·2.547·seconds) |
| 125 | Download_Jupyter_notebook:_isomorphism.ipynb | 125 | Download_Jupyter_notebook:_isomorphism.ipynb |
| 126 | Download_Python_source_code:_isomorphism.py | 126 | Download_Python_source_code:_isomorphism.py |
| 127 | Download_zipped:_isomorphism.zip | 127 | Download_zipped:_isomorphism.zip |
| 128 | Gallery_generated_by_Sphinx-Gallery | 128 | Gallery_generated_by_Sphinx-Gallery |
| 129 | Previous | 129 | Previous |
| 130 | Next | 130 | Next |
| Offset 154, 15 lines modified | Offset 154, 15 lines modified | ||
| 154 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> | 154 | ····<span·class="n">layout</span><span·class="o">=</span><span·class="s2">"circle"</span><span·class="p">,</span> |
| 155 | ····<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> | 155 | ····<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> |
| 156 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> | 156 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> |
| 157 | <span·class="p">)</span> | 157 | <span·class="p">)</span> |
| 158 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 158 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 159 | </pre></div> | 159 | </pre></div> |
| 160 | </div> | 160 | </div> |
| 161 | <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. | 161 | <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.139·seconds)</p> |
| 162 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-maxflow-py"> | 162 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-maxflow-py"> |
| 163 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 163 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 164 | <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> | 164 | <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> |
| 165 | </div> | 165 | </div> |
| 166 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 166 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 167 | <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> | 167 | <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> |
| 168 | </div> | 168 | </div> |
| Offset 71, 15 lines modified | Offset 71, 15 lines modified | ||
| 71 | ····target=ax, | 71 | ····target=ax, |
| 72 | ····layout="circle", | 72 | ····layout="circle", |
| 73 | ····vertex_label=range(g.vcount()), | 73 | ····vertex_label=range(g.vcount()), |
| 74 | ····vertex_color="lightblue", | 74 | ····vertex_color="lightblue", |
| 75 | ) | 75 | ) |
| 76 | plt.show() | 76 | plt.show() |
| 77 | [maxflow] | 77 | [maxflow] |
| 78 | Total·running·time·of·the·script:·(0·minutes·0. | 78 | Total·running·time·of·the·script:·(0·minutes·0.139·seconds) |
| 79 | Download_Jupyter_notebook:_maxflow.ipynb | 79 | Download_Jupyter_notebook:_maxflow.ipynb |
| 80 | Download_Python_source_code:_maxflow.py | 80 | Download_Python_source_code:_maxflow.py |
| 81 | Download_zipped:_maxflow.zip | 81 | Download_zipped:_maxflow.zip |
| 82 | Gallery_generated_by_Sphinx-Gallery | 82 | Gallery_generated_by_Sphinx-Gallery |
| 83 | Previous | 83 | Previous |
| 84 | Next | 84 | Next |
| Offset 165, 15 lines modified | Offset 165, 15 lines modified | ||
| 165 | ····<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_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> |
| 166 | ····<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_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> |
| 167 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> | 167 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> |
| 168 | <span·class="p">)</span> | 168 | <span·class="p">)</span> |
| 169 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 169 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 170 | </pre></div> | 170 | </pre></div> |
| 171 | </div> | 171 | </div> |
| 172 | <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· | 172 | <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.508·seconds)</p> |
| 173 | <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-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-minimum-spanning-trees-py"> |
| 174 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 174 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 175 | <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 | <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> |
| 176 | </div> | 176 | </div> |
| 177 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 177 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 178 | <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 | <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> |
| 179 | </div> | 179 | </div> |
| Offset 79, 15 lines modified | Offset 79, 15 lines modified | ||
| 79 | ····vertex_color="lightblue", | 79 | ····vertex_color="lightblue", |
| 80 | ····edge_width=g.es["width"], | 80 | ····edge_width=g.es["width"], |
| 81 | ····edge_label=g.es["weight"], | 81 | ····edge_label=g.es["weight"], |
| 82 | ····edge_background="white", | 82 | ····edge_background="white", |
| 83 | ) | 83 | ) |
| 84 | plt.show() | 84 | plt.show() |
| 85 | [minimum·spanning·trees] | 85 | [minimum·spanning·trees] |
| 86 | Total·running·time·of·the·script:·(0·minutes· | 86 | Total·running·time·of·the·script:·(0·minutes·0.508·seconds) |
| 87 | Download_Jupyter_notebook:_minimum_spanning_trees.ipynb | 87 | Download_Jupyter_notebook:_minimum_spanning_trees.ipynb |
| 88 | Download_Python_source_code:_minimum_spanning_trees.py | 88 | Download_Python_source_code:_minimum_spanning_trees.py |
| 89 | Download_zipped:_minimum_spanning_trees.zip | 89 | Download_zipped:_minimum_spanning_trees.zip |
| 90 | Gallery_generated_by_Sphinx-Gallery | 90 | Gallery_generated_by_Sphinx-Gallery |
| 91 | Previous | 91 | Previous |
| 92 | Next | 92 | Next |
| Offset 215, 15 lines modified | Offset 215, 15 lines modified | ||
| 215 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> | 215 | ····<span·class="n">vertex_color</span><span·class="o">=</span><span·class="s2">"lightblue"</span><span·class="p">,</span> |
| 216 | ····<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> | 216 | ····<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> |
| 217 | ····<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> | 217 | ····<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> |
| 218 | <span·class="p">)</span> | 218 | <span·class="p">)</span> |
| 219 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 219 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 220 | </pre></div> | 220 | </pre></div> |
| 221 | </div> | 221 | </div> |
| 222 | <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· | 222 | <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.557·seconds)</p> |
| 223 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-online-user-actions-py"> | 223 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-online-user-actions-py"> |
| 224 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 224 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 225 | <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> | 225 | <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> |
| 226 | </div> | 226 | </div> |
| 227 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 227 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 228 | <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> | 228 | <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> |
| 229 | </div> | 229 | </div> |
| Offset 127, 15 lines modified | Offset 127, 15 lines modified | ||
| 127 | ····vertex_label=g.vs["name"], | 127 | ····vertex_label=g.vs["name"], |
| 128 | ····vertex_color="lightblue", | 128 | ····vertex_color="lightblue", |
| 129 | ····vertex_size=vertex_size, | 129 | ····vertex_size=vertex_size, |
| 130 | ····edge_width=g.es["weight"], | 130 | ····edge_width=g.es["weight"], |
| 131 | ) | 131 | ) |
| 132 | plt.show() | 132 | plt.show() |
| 133 | [online·user·actions] | 133 | [online·user·actions] |
| 134 | Total·running·time·of·the·script:·(0·minutes· | 134 | Total·running·time·of·the·script:·(0·minutes·0.557·seconds) |
| 135 | Download_Jupyter_notebook:_online_user_actions.ipynb | 135 | Download_Jupyter_notebook:_online_user_actions.ipynb |
| 136 | Download_Python_source_code:_online_user_actions.py | 136 | Download_Python_source_code:_online_user_actions.py |
| 137 | Download_zipped:_online_user_actions.zip | 137 | Download_zipped:_online_user_actions.zip |
| 138 | Gallery_generated_by_Sphinx-Gallery | 138 | Gallery_generated_by_Sphinx-Gallery |
| 139 | Previous | 139 | Previous |
| 140 | Next | 140 | Next |
| Offset 203, 15 lines modified | Offset 203, 15 lines modified | ||
| 203 | <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> | 203 | <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> |
| 204 | </pre></div> | 204 | </pre></div> |
| 205 | </div> | 205 | </div> |
| 206 | <p>Here·we·can·see·the·same·plot·with·the·new·damping·parameter:</p> | 206 | <p>Here·we·can·see·the·same·plot·with·the·new·damping·parameter:</p> |
| 207 | <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> | 207 | <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> |
| 208 | </pre></div> | 208 | </pre></div> |
| 209 | </div> | 209 | </div> |
| 210 | <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· | 210 | <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·7.126·seconds)</p> |
| 211 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-personalized-pagerank-py"> | 211 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-personalized-pagerank-py"> |
| 212 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 212 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 213 | <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> | 213 | <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> |
| 214 | </div> | 214 | </div> |
| 215 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 215 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 216 | <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> | 216 | <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> |
| 217 | </div> | 217 | </div> |
| Offset 117, 15 lines modified | Offset 117, 15 lines modified | ||
| 117 | [Graph·with·Personalized·PageRank] | 117 | [Graph·with·Personalized·PageRank] |
| 118 | Alternatively,·we·can·play·around·with·the·damping·parameter: | 118 | Alternatively,·we·can·play·around·with·the·damping·parameter: |
| 119 | personalized_page_rank·=·g.personalized_pagerank(damping=0.45,·reset=reset_ | 119 | personalized_page_rank·=·g.personalized_pagerank(damping=0.45,·reset=reset_ |
| 120 | vector) | 120 | vector) |
| 121 | Here·we·can·see·the·same·plot·with·the·new·damping·parameter: | 121 | Here·we·can·see·the·same·plot·with·the·new·damping·parameter: |
| 122 | plot_pagerank(g,·personalized_page_rank) | 122 | plot_pagerank(g,·personalized_page_rank) |
| 123 | [Graph·with·Personalized·PageRank] | 123 | [Graph·with·Personalized·PageRank] |
| 124 | Total·running·time·of·the·script:·(0·minutes· | 124 | Total·running·time·of·the·script:·(0·minutes·7.126·seconds) |
| 125 | Download_Jupyter_notebook:_personalized_pagerank.ipynb | 125 | Download_Jupyter_notebook:_personalized_pagerank.ipynb |
| 126 | Download_Python_source_code:_personalized_pagerank.py | 126 | Download_Python_source_code:_personalized_pagerank.py |
| 127 | Download_zipped:_personalized_pagerank.zip | 127 | Download_zipped:_personalized_pagerank.zip |
| 128 | Gallery_generated_by_Sphinx-Gallery | 128 | Gallery_generated_by_Sphinx-Gallery |
| 129 | Previous | 129 | Previous |
| 130 | Next | 130 | Next |
| Offset 188, 15 lines modified | Offset 188, 15 lines modified | ||
| 188 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">savefig</span><span·class="p">(</span><span·class="s2">"social_network.pdf"</span><span·class="p">)</span> | 188 | <span·class="n">fig</span><span·class="o">.</span><span·class="n">savefig</span><span·class="p">(</span><span·class="s2">"social_network.pdf"</span><span·class="p">)</span> |
| 189 | <span·class="c1">#·Export·and·import·a·graph·as·a·GML·file.</span> | 189 | <span·class="c1">#·Export·and·import·a·graph·as·a·GML·file.</span> |
| 190 | <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> | 190 | <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> |
| 191 | <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> | 191 | <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> |
| 192 | </pre></div> | 192 | </pre></div> |
| 193 | </div> | 193 | </div> |
| 194 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 194 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·2.189·seconds)</p> |
| 195 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-quickstart-py"> | 195 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-quickstart-py"> |
| 196 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 196 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 197 | <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> | 197 | <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> |
| 198 | </div> | 198 | </div> |
| 199 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 199 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 200 | <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> | 200 | <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> |
| 201 | </div> | 201 | </div> |
| Offset 110, 15 lines modified | Offset 110, 15 lines modified | ||
| 110 | fig.savefig("social_network.png") | 110 | fig.savefig("social_network.png") |
| 111 | fig.savefig("social_network.jpg") | 111 | fig.savefig("social_network.jpg") |
| 112 | fig.savefig("social_network.pdf") | 112 | fig.savefig("social_network.pdf") |
| 113 | #·Export·and·import·a·graph·as·a·GML·file. | 113 | #·Export·and·import·a·graph·as·a·GML·file. |
| 114 | g.save("social_network.gml") | 114 | g.save("social_network.gml") |
| 115 | g·=·ig.load("social_network.gml") | 115 | g·=·ig.load("social_network.gml") |
| 116 | Total·running·time·of·the·script:·(0·minutes· | 116 | Total·running·time·of·the·script:·(0·minutes·2.189·seconds) |
| 117 | Download_Jupyter_notebook:_quickstart.ipynb | 117 | Download_Jupyter_notebook:_quickstart.ipynb |
| 118 | Download_Python_source_code:_quickstart.py | 118 | Download_Python_source_code:_quickstart.py |
| 119 | Download_zipped:_quickstart.zip | 119 | Download_zipped:_quickstart.zip |
| 120 | Gallery_generated_by_Sphinx-Gallery | 120 | Gallery_generated_by_Sphinx-Gallery |
| 121 | Previous | 121 | Previous |
| 122 | Next | 122 | Next |
| Offset 373, 62 lines modified | Offset 373, 62 lines modified | ||
| 373 | .anim-state·input·{ | 373 | .anim-state·input·{ |
| 374 | ····margin:·0; | 374 | ····margin:·0; |
| 375 | ····vertical-align:·middle; | 375 | ····vertical-align:·middle; |
| 376 | } | 376 | } |
| 377 | </style> | 377 | </style> |
| 378 | <div·class="animation"> | 378 | <div·class="animation"> |
| 379 | ··<img·id="_anim_img | 379 | ··<img·id="_anim_img6455ccbe55464047b94702b1e2f5c62a"> |
| 380 | ··<div·class="anim-controls"> | 380 | ··<div·class="anim-controls"> |
| 381 | ····<input·id="_anim_slider | 381 | ····<input·id="_anim_slider6455ccbe55464047b94702b1e2f5c62a"·type="range"·class="anim-slider" |
| 382 | ···········name="points"·min="0"·max="1"·step="1"·value="0" | 382 | ···········name="points"·min="0"·max="1"·step="1"·value="0" |
| 383 | ···········oninput="anim | 383 | ···········oninput="anim6455ccbe55464047b94702b1e2f5c62a.set_frame(parseInt(this.value));"> |
| 384 | ····<div·class="anim-buttons"> | 384 | ····<div·class="anim-buttons"> |
| 385 | ······<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="anim | 385 | ······<button·title="Decrease·speed"·aria-label="Decrease·speed"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.slower()"> |
| 386 | ··········<i·class="fa·fa-minus"></i></button> | 386 | ··········<i·class="fa·fa-minus"></i></button> |
| 387 | ······<button·title="First·frame"·aria-label="First·frame"·onclick="anim | 387 | ······<button·title="First·frame"·aria-label="First·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.first_frame()"> |
| 388 | ········<i·class="fa·fa-fast-backward"></i></button> | 388 | ········<i·class="fa·fa-fast-backward"></i></button> |
| 389 | ······<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="anim | 389 | ······<button·title="Previous·frame"·aria-label="Previous·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.previous_frame()"> |
| 390 | ··········<i·class="fa·fa-step-backward"></i></button> | 390 | ··········<i·class="fa·fa-step-backward"></i></button> |
| 391 | ······<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="anim | 391 | ······<button·title="Play·backwards"·aria-label="Play·backwards"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.reverse_animation()"> |
| 392 | ··········<i·class="fa·fa-play·fa-flip-horizontal"></i></button> | 392 | ··········<i·class="fa·fa-play·fa-flip-horizontal"></i></button> |
| 393 | ······<button·title="Pause"·aria-label="Pause"·onclick="anim | 393 | ······<button·title="Pause"·aria-label="Pause"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.pause_animation()"> |
| 394 | ··········<i·class="fa·fa-pause"></i></button> | 394 | ··········<i·class="fa·fa-pause"></i></button> |
| 395 | ······<button·title="Play"·aria-label="Play"·onclick="anim | 395 | ······<button·title="Play"·aria-label="Play"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.play_animation()"> |
| 396 | ··········<i·class="fa·fa-play"></i></button> | 396 | ··········<i·class="fa·fa-play"></i></button> |
| 397 | ······<button·title="Next·frame"·aria-label="Next·frame"·onclick="anim | 397 | ······<button·title="Next·frame"·aria-label="Next·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.next_frame()"> |
| 398 | ··········<i·class="fa·fa-step-forward"></i></button> | 398 | ··········<i·class="fa·fa-step-forward"></i></button> |
| 399 | ······<button·title="Last·frame"·aria-label="Last·frame"·onclick="anim | 399 | ······<button·title="Last·frame"·aria-label="Last·frame"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.last_frame()"> |
| 400 | ··········<i·class="fa·fa-fast-forward"></i></button> | 400 | ··········<i·class="fa·fa-fast-forward"></i></button> |
| 401 | ······<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="anim | 401 | ······<button·title="Increase·speed"·aria-label="Increase·speed"·onclick="anim6455ccbe55464047b94702b1e2f5c62a.faster()"> |
| 402 | ··········<i·class="fa·fa-plus"></i></button> | 402 | ··········<i·class="fa·fa-plus"></i></button> |
| 403 | ····</div> | 403 | ····</div> |
| 404 | ····<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_select | 404 | ····<form·title="Repetition·mode"·aria-label="Repetition·mode"·action="#n"·name="_anim_loop_select6455ccbe55464047b94702b1e2f5c62a" |
| 405 | ··········class="anim-state"> | 405 | ··········class="anim-state"> |
| 406 | ······<input·type="radio"·name="state"·value="once"·id="_anim_radio1_ | 406 | ······<input·type="radio"·name="state"·value="once"·id="_anim_radio1_6455ccbe55464047b94702b1e2f5c62a" |
| 407 | ·············> | 407 | ·············> |
| 408 | ······<label·for="_anim_radio1_07c18edf426e47cb8fbf7c7d19ed8fa0">Once</label> | ||
| 409 | ······< | 408 | ······<label·for="_anim_radio1_6455ccbe55464047b94702b1e2f5c62a">Once</label> |
| 409 | ······<input·type="radio"·name="state"·value="loop"·id="_anim_radio2_6455ccbe55464047b94702b1e2f5c62a" | ||
| 410 | ·············checked> | 410 | ·············checked> |
| 411 | ······<label·for="_anim_radio2_07c18edf426e47cb8fbf7c7d19ed8fa0">Loop</label> | ||
| 412 | ······< | 411 | ······<label·for="_anim_radio2_6455ccbe55464047b94702b1e2f5c62a">Loop</label> |
| 412 | ······<input·type="radio"·name="state"·value="reflect"·id="_anim_radio3_6455ccbe55464047b94702b1e2f5c62a" | ||
| 413 | ·············> | 413 | ·············> |
| 414 | ······<label·for="_anim_radio3_ | 414 | ······<label·for="_anim_radio3_6455ccbe55464047b94702b1e2f5c62a">Reflect</label> |
| 415 | ····</form> | 415 | ····</form> |
| 416 | ··</div> | 416 | ··</div> |
| 417 | </div> | 417 | </div> |
| 418 | <script·language="javascript"> | 418 | <script·language="javascript"> |
| 419 | ··/*·Instantiate·the·Animation·class.·*/ | 419 | ··/*·Instantiate·the·Animation·class.·*/ |
| 420 | ··/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ | 420 | ··/*·The·IDs·given·should·match·those·used·in·the·template·above.·*/ |
| 421 | ··(function()·{ | 421 | ··(function()·{ |
| 422 | ····var·img_id·=·"_anim_img07c18edf426e47cb8fbf7c7d19ed8fa0"; | ||
| 423 | ····var·slider_id·=·"_anim_slider07c18edf426e47cb8fbf7c7d19ed8fa0"; | ||
| 424 | ····var· | 422 | ····var·img_id·=·"_anim_img6455ccbe55464047b94702b1e2f5c62a"; |
| 423 | ····var·slider_id·=·"_anim_slider6455ccbe55464047b94702b1e2f5c62a"; | ||
| 424 | ····var·loop_select_id·=·"_anim_loop_select6455ccbe55464047b94702b1e2f5c62a"; | ||
| 425 | ····var·frames·=·new·Array(12); | 425 | ····var·frames·=·new·Array(12); |
| 426 | ··frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ | 426 | ··frames[0]·=·"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAHgCAYAAAA10dzkAAAAQHRFWHRTb2Z0d2FyZQBNYXRwbG90\ |
| 427 | bGliIHZlcnNpb24zLjEwLjcrZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvhF0PpwAAAAlw\ | 427 | bGliIHZlcnNpb24zLjEwLjcrZGZzZzEsIGh0dHBzOi8vbWF0cGxvdGxpYi5vcmcvhF0PpwAAAAlw\ |
| 428 | SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ | 428 | SFlzAAAPYQAAD2EBqD+naQAACMlJREFUeJzt1jEBACAMwDDAv+fhAo4mCnp2z8wsAAAyzu8AAADe\ |
| 429 | MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ | 429 | MoAAADEGEAAgxgACAMQYQACAGAMIABBjAAEAYgwgAECMAQQAiDGAAAAxBhAAIMYAAgDEGEAAgBgD\ |
| 430 | CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ | 430 | CAAQYwABAGIMIABAjAEEAIgxgAAAMQYQACDGAAIAxBhAAIAYAwgAEGMAAQBiDCAAQIwBBACIMYAA\ |
| Offset 2955, 29 lines modified | Offset 2955, 29 lines modified | ||
| 2955 | AABMhgAIAABgMv8HiVg4h3Ra3U0AAAAASUVORK5CYII=\ | 2955 | AABMhgAIAABgMv8HiVg4h3Ra3U0AAAAASUVORK5CYII=\ |
| 2956 | " | 2956 | " |
| 2957 | ····/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before | 2957 | ····/*·set·a·timeout·to·make·sure·all·the·above·elements·are·created·before |
| 2958 | ·······the·object·is·initialized.·*/ | 2958 | ·······the·object·is·initialized.·*/ |
| 2959 | ····setTimeout(function()·{ | 2959 | ····setTimeout(function()·{ |
| 2960 | ········anim | 2960 | ········anim6455ccbe55464047b94702b1e2f5c62a·=·new·Animation(frames,·img_id,·slider_id,·500.0, |
| 2961 | ·································loop_select_id); | 2961 | ·································loop_select_id); |
| 2962 | ····},·0); | 2962 | ····},·0); |
| 2963 | ··})() | 2963 | ··})() |
| 2964 | </script></div> | 2964 | </script></div> |
| 2965 | <div·class="admonition·note"> | 2965 | <div·class="admonition·note"> |
| 2966 | <p·class="admonition-title">Note</p> | 2966 | <p·class="admonition-title">Note</p> |
| 2967 | <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 | <p>We·use·<em>igraph</em>’s·<code·class="xref·py·py-meth·docutils·literal·notranslate"><span·class="pre">Graph.subgraph()</span></code>·(see |
| 2968 | <a·class="reference·external"·href="/en/latest/api/igraph.GraphBase.html#induced_subgraph"·title="(in·igraph·v1.0.0)"><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 | <a·class="reference·external"·href="/en/latest/api/igraph.GraphBase.html#induced_subgraph"·title="(in·igraph·v1.0.0)"><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 |
| 2969 | the·ring·graph·at·a·time·for·each·frame.·While·sufficient·for·an·easy | 2969 | the·ring·graph·at·a·time·for·each·frame.·While·sufficient·for·an·easy |
| 2970 | example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient | 2970 | example,·this·approach·is·not·very·efficient.·Thinking·of·more·efficient |
| 2971 | approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn | 2971 | approaches,·e.g.·vertices·with·zero·radius,·is·a·useful·exercise·to·learn |
| 2972 | the·combination·of·igraph·and·matplotlib.</p> | 2972 | the·combination·of·igraph·and·matplotlib.</p> |
| 2973 | </div> | 2973 | </div> |
| 2974 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 2974 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·5.690·seconds)</p> |
| 2975 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-ring-animation-py"> | 2975 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-ring-animation-py"> |
| 2976 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 2976 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 2977 | <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 | <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> |
| 2978 | </div> | 2978 | </div> |
| 2979 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 2979 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 2980 | <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 | <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> |
| 2981 | </div> | 2981 | </div> |
| Offset 109, 15 lines modified | Offset 109, 15 lines modified | ||
| 109 | oOnce·oLoop·oReflect | 109 | oOnce·oLoop·oReflect |
| 110 | Note | 110 | Note |
| 111 | We·use·igraph’s·Graph.subgraph()·(see·igraph.GraphBase.induced_subgraph())·in | 111 | We·use·igraph’s·Graph.subgraph()·(see·igraph.GraphBase.induced_subgraph())·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 | Total·running·time·of·the·script:·(0·minutes· | 116 | Total·running·time·of·the·script:·(0·minutes·5.690·seconds) |
| 117 | Download_Jupyter_notebook:_ring_animation.ipynb | 117 | Download_Jupyter_notebook:_ring_animation.ipynb |
| 118 | Download_Python_source_code:_ring_animation.py | 118 | Download_Python_source_code:_ring_animation.py |
| 119 | Download_zipped:_ring_animation.zip | 119 | Download_zipped:_ring_animation.zip |
| 120 | Gallery_generated_by_Sphinx-Gallery | 120 | Gallery_generated_by_Sphinx-Gallery |
| 121 | Previous | 121 | Previous |
| 122 | Next | 122 | Next |
| Offset 194, 15 lines modified | Offset 194, 15 lines modified | ||
| 194 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"#666"</span><span·class="p">,</span> | 194 | ····<span·class="n">edge_color</span><span·class="o">=</span><span·class="s2">"#666"</span><span·class="p">,</span> |
| 195 | ····<span·class="n">edge_align_label</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span> | 195 | ····<span·class="n">edge_align_label</span><span·class="o">=</span><span·class="kc">True</span><span·class="p">,</span> |
| 196 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> | 196 | ····<span·class="n">edge_background</span><span·class="o">=</span><span·class="s2">"white"</span><span·class="p">,</span> |
| 197 | <span·class="p">)</span> | 197 | <span·class="p">)</span> |
| 198 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 198 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 199 | </pre></div> | 199 | </pre></div> |
| 200 | </div> | 200 | </div> |
| 201 | <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. | 201 | <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.150·seconds)</p> |
| 202 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-shortest-path-visualisation-py"> | 202 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-shortest-path-visualisation-py"> |
| 203 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 203 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 204 | <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> | 204 | <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> |
| 205 | </div> | 205 | </div> |
| 206 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 206 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 207 | <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> | 207 | <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> |
| 208 | </div> | 208 | </div> |
| Offset 105, 15 lines modified | Offset 105, 15 lines modified | ||
| 105 | ····edge_label=g.es["weight"], | 105 | ····edge_label=g.es["weight"], |
| 106 | ····edge_color="#666", | 106 | ····edge_color="#666", |
| 107 | ····edge_align_label=True, | 107 | ····edge_align_label=True, |
| 108 | ····edge_background="white", | 108 | ····edge_background="white", |
| 109 | ) | 109 | ) |
| 110 | plt.show() | 110 | plt.show() |
| 111 | [shortest·path·visualisation] | 111 | [shortest·path·visualisation] |
| 112 | Total·running·time·of·the·script:·(0·minutes·0. | 112 | Total·running·time·of·the·script:·(0·minutes·0.150·seconds) |
| 113 | Download_Jupyter_notebook:_shortest_path_visualisation.ipynb | 113 | Download_Jupyter_notebook:_shortest_path_visualisation.ipynb |
| 114 | Download_Python_source_code:_shortest_path_visualisation.py | 114 | Download_Python_source_code:_shortest_path_visualisation.py |
| 115 | Download_zipped:_shortest_path_visualisation.zip | 115 | Download_zipped:_shortest_path_visualisation.zip |
| 116 | Gallery_generated_by_Sphinx-Gallery | 116 | Gallery_generated_by_Sphinx-Gallery |
| 117 | Previous | 117 | Previous |
| 118 | Next | 118 | Next |
| Offset 150, 15 lines modified | Offset 150, 15 lines modified | ||
| 150 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a | 150 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a |
| 151 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph | 151 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph |
| 152 | untouched:</p> | 152 | untouched:</p> |
| 153 | <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> | 153 | <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> |
| 154 | <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> | 154 | <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> |
| 155 | </pre></div> | 155 | </pre></div> |
| 156 | </div> | 156 | </div> |
| 157 | <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">0x7f | 157 | <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">0x7f3ec0b36d50</span><span·class="o">></span> |
| 158 | </pre></div> | 158 | </pre></div> |
| 159 | </div> | 159 | </div> |
| 160 | <p>We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s | 160 | <p>We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s |
| 161 | choose·a·consistent·visual·style:</p> | 161 | choose·a·consistent·visual·style:</p> |
| 162 | <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> | 162 | <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> |
| 163 | ····<span·class="s2">"vertex_color"</span><span·class="p">:</span>·<span·class="s2">"lightblue"</span><span·class="p">,</span> | 163 | ····<span·class="s2">"vertex_color"</span><span·class="p">:</span>·<span·class="s2">"lightblue"</span><span·class="p">,</span> |
| 164 | ····<span·class="s2">"vertex_size"</span><span·class="p">:</span>·<span·class="mi">20</span><span·class="p">,</span> | 164 | ····<span·class="s2">"vertex_size"</span><span·class="p">:</span>·<span·class="mi">20</span><span·class="p">,</span> |
| Offset 205, 15 lines modified | Offset 205, 15 lines modified | ||
| 205 | ········<span·class="n">lw</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">,</span> | 205 | ········<span·class="n">lw</span><span·class="o">=</span><span·class="mi">4</span><span·class="p">,</span> |
| 206 | ········<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> | 206 | ········<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> |
| 207 | ····<span·class="p">)</span> | 207 | ····<span·class="p">)</span> |
| 208 | <span·class="p">)</span> | 208 | <span·class="p">)</span> |
| 209 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 209 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 210 | </pre></div> | 210 | </pre></div> |
| 211 | </div> | 211 | </div> |
| 212 | <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. | 212 | <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.258·seconds)</p> |
| 213 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-simplify-py"> | 213 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-simplify-py"> |
| 214 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 214 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 215 | <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> | 215 | <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> |
| 216 | </div> | 216 | </div> |
| 217 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 217 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 218 | <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> | 218 | <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> |
| 219 | </div> | 219 | </div> |
| Offset 69, 15 lines modified | Offset 69, 15 lines modified | ||
| 69 | ) | 69 | ) |
| 70 | To·simplify·the·graph,·we·must·remember·that·the·function·operates·in·place, | 70 | To·simplify·the·graph,·we·must·remember·that·the·function·operates·in·place, |
| 71 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a | 71 | i.e.·directly·changes·the·graph·that·it·is·run·on.·So·we·need·to·first·make·a |
| 72 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph | 72 | copy·of·our·graph,·and·then·simplify·that·copy·to·keep·the·original·graph |
| 73 | untouched: | 73 | untouched: |
| 74 | g2·=·g1.copy() | 74 | g2·=·g1.copy() |
| 75 | g2.simplify() | 75 | g2.simplify() |
| 76 | <igraph.Graph·object·at·0x7f | 76 | <igraph.Graph·object·at·0x7f3ec0b36d50> |
| 77 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s | 77 | We·can·then·proceed·to·plot·both·graphs·to·see·the·difference.·First,·let’s |
| 78 | choose·a·consistent·visual·style: | 78 | choose·a·consistent·visual·style: |
| 79 | visual_style·=·{ | 79 | visual_style·=·{ |
| 80 | ····"vertex_color":·"lightblue", | 80 | ····"vertex_color":·"lightblue", |
| 81 | ····"vertex_size":·20, | 81 | ····"vertex_size":·20, |
| 82 | ····"vertex_label":·[0,·1,·2,·3,·4], | 82 | ····"vertex_label":·[0,·1,·2,·3,·4], |
| 83 | } | 83 | } |
| Offset 119, 15 lines modified | Offset 119, 15 lines modified | ||
| 119 | ········ec="k", | 119 | ········ec="k", |
| 120 | ········lw=4, | 120 | ········lw=4, |
| 121 | ········transform=axs[1].transAxes, | 121 | ········transform=axs[1].transAxes, |
| 122 | ····) | 122 | ····) |
| 123 | ) | 123 | ) |
| 124 | plt.show() | 124 | plt.show() |
| 125 | [Multigraph...,·...simplified] | 125 | [Multigraph...,·...simplified] |
| 126 | Total·running·time·of·the·script:·(0·minutes·0. | 126 | Total·running·time·of·the·script:·(0·minutes·0.258·seconds) |
| 127 | Download_Jupyter_notebook:_simplify.ipynb | 127 | Download_Jupyter_notebook:_simplify.ipynb |
| 128 | Download_Python_source_code:_simplify.py | 128 | Download_Python_source_code:_simplify.py |
| 129 | Download_zipped:_simplify.zip | 129 | Download_zipped:_simplify.zip |
| 130 | Gallery_generated_by_Sphinx-Gallery | 130 | Gallery_generated_by_Sphinx-Gallery |
| 131 | Previous | 131 | Previous |
| 132 | Next | 132 | Next |
| Offset 167, 15 lines modified | Offset 167, 15 lines modified | ||
| 167 | </pre></div> | 167 | </pre></div> |
| 168 | </div> | 168 | </div> |
| 169 | <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"> | 169 | <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"> |
| 170 | <p·class="admonition-title">Note</p> | 170 | <p·class="admonition-title">Note</p> |
| 171 | <p>To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, | 171 | <p>To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot, |
| 172 | you·can·call·<cite>ax.invert_yaxis()</cite>·before·<cite>plt.show()</cite>.</p> | 172 | you·can·call·<cite>ax.invert_yaxis()</cite>·before·<cite>plt.show()</cite>.</p> |
| 173 | </div> | 173 | </div> |
| 174 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 174 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.633·seconds)</p> |
| 175 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-spanning-trees-py"> | 175 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-spanning-trees-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/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> | 177 | <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> |
| 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/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> | 180 | <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> |
| 181 | </div> | 181 | </div> |
| Offset 80, 15 lines modified | Offset 80, 15 lines modified | ||
| 80 | ig.plot(g,·target=ax,·layout=layout,·vertex_color="lightblue",·edge_width=g.es | 80 | ig.plot(g,·target=ax,·layout=layout,·vertex_color="lightblue",·edge_width=g.es |
| 81 | ["width"]) | 81 | ["width"]) |
| 82 | plt.show() | 82 | plt.show() |
| 83 | [spanning·trees] | 83 | [spanning·trees] |
| 84 | Note | 84 | Note |
| 85 | To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot,·you | 85 | To·invert·the·y·axis·such·that·the·root·of·the·tree·is·on·top·of·the·plot,·you |
| 86 | can·callax.invert_yaxis()beforeplt.show(). | 86 | can·callax.invert_yaxis()beforeplt.show(). |
| 87 | Total·running·time·of·the·script:·(0·minutes· | 87 | Total·running·time·of·the·script:·(0·minutes·0.633·seconds) |
| 88 | Download_Jupyter_notebook:_spanning_trees.ipynb | 88 | Download_Jupyter_notebook:_spanning_trees.ipynb |
| 89 | Download_Python_source_code:_spanning_trees.py | 89 | Download_Python_source_code:_spanning_trees.py |
| 90 | Download_zipped:_spanning_trees.zip | 90 | Download_zipped:_spanning_trees.zip |
| 91 | Gallery_generated_by_Sphinx-Gallery | 91 | Gallery_generated_by_Sphinx-Gallery |
| 92 | Previous | 92 | Previous |
| 93 | Next | 93 | Next |
| Offset 278, 15 lines modified | Offset 278, 15 lines modified | ||
| 278 | <aside·class="footnote·brackets"·id="id2"·role="doc-footnote"> | 278 | <aside·class="footnote·brackets"·id="id2"·role="doc-footnote"> |
| 279 | <span·class="label"><span·class="fn-bracket">[</span><a·role="doc-backlink"·href="#id1">1</a><span·class="fn-bracket">]</span></span> | 279 | <span·class="label"><span·class="fn-bracket">[</span><a·role="doc-backlink"·href="#id1">1</a><span·class="fn-bracket">]</span></span> |
| 280 | <ol·class="upperalpha·simple"·start="23"> | 280 | <ol·class="upperalpha·simple"·start="23"> |
| 281 | <li><p>Zachary:·“An·Information·Flow·Model·for·Conflict·and·Fission·in·Small·Groups”.·Journal·of·Anthropological·Research·33,·no.·4·(1977):·452–73.·<a·class="reference·external"·href="https://www.jstor.org/stable/3629752">https://www.jstor.org/stable/3629752</a></p></li> | 281 | <li><p>Zachary:·“An·Information·Flow·Model·for·Conflict·and·Fission·in·Small·Groups”.·Journal·of·Anthropological·Research·33,·no.·4·(1977):·452–73.·<a·class="reference·external"·href="https://www.jstor.org/stable/3629752">https://www.jstor.org/stable/3629752</a></p></li> |
| 282 | </ol> | 282 | </ol> |
| 283 | </aside> | 283 | </aside> |
| 284 | </aside> | 284 | </aside> |
| 285 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 285 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·2.150·seconds)</p> |
| 286 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-stochastic-variability-py"> | 286 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-stochastic-variability-py"> |
| 287 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 287 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 288 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/595531dbf38edbd16a13dba825bc0621/stochastic_variability.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">stochastic_variability.ipynb</span></code></a></p> | 288 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/595531dbf38edbd16a13dba825bc0621/stochastic_variability.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">stochastic_variability.ipynb</span></code></a></p> |
| 289 | </div> | 289 | </div> |
| 290 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 290 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 291 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d0663c6bd6e9f7c982ebe7354d80a1a6/stochastic_variability.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">stochastic_variability.py</span></code></a></p> | 291 | <p><a·class="reference·download·internal"·download=""·href="../_downloads/d0663c6bd6e9f7c982ebe7354d80a1a6/stochastic_variability.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">stochastic_variability.py</span></code></a></p> |
| 292 | </div> | 292 | </div> |
| Offset 189, 15 lines modified | Offset 189, 15 lines modified | ||
| 189 | is·concentrated·near·0,·suggesting·a·robust·community·structure.·In·contrast | 189 | is·concentrated·near·0,·suggesting·a·robust·community·structure.·In·contrast |
| 190 | the·values·obtained·for·the·random·network·are·much·more·spread·out,·showing | 190 | the·values·obtained·for·the·random·network·are·much·more·spread·out,·showing |
| 191 | inconsistent·partitionings·due·to·the·lack·of·a·clear·community·structure. | 191 | inconsistent·partitionings·due·to·the·lack·of·a·clear·community·structure. |
| 192 | [1] | 192 | [1] |
| 193 | ···1.·Zachary:·“An·Information·Flow·Model·for·Conflict·and·Fission·in·Small | 193 | ···1.·Zachary:·“An·Information·Flow·Model·for·Conflict·and·Fission·in·Small |
| 194 | ······Groups”.·Journal·of·Anthropological·Research·33,·no.·4·(1977):·452–73. | 194 | ······Groups”.·Journal·of·Anthropological·Research·33,·no.·4·(1977):·452–73. |
| 195 | ······https://www.jstor.org/stable/3629752 | 195 | ······https://www.jstor.org/stable/3629752 |
| 196 | Total·running·time·of·the·script:·(0·minutes· | 196 | Total·running·time·of·the·script:·(0·minutes·2.150·seconds) |
| 197 | Download_Jupyter_notebook:_stochastic_variability.ipynb | 197 | Download_Jupyter_notebook:_stochastic_variability.ipynb |
| 198 | Download_Python_source_code:_stochastic_variability.py | 198 | Download_Python_source_code:_stochastic_variability.py |
| 199 | Download_zipped:_stochastic_variability.zip | 199 | Download_zipped:_stochastic_variability.zip |
| 200 | Gallery_generated_by_Sphinx-Gallery | 200 | Gallery_generated_by_Sphinx-Gallery |
| 201 | Previous | 201 | Previous |
| 202 | Next | 202 | Next |
| Offset 183, 15 lines modified | Offset 183, 15 lines modified | ||
| 183 | <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">1</span><span·class="p">:</span>·<span·class="mi">1</span> |
| 184 | <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">2</span><span·class="p">:</span>·<span·class="mi">1</span> |
| 185 | <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">3</span><span·class="p">:</span>·<span·class="mi">2</span> |
| 186 | <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">4</span><span·class="p">:</span>·<span·class="mi">1</span> |
| 187 | <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 | <span·class="n">degree</span>·<span·class="n">of</span>·<span·class="mi">5</span><span·class="p">:</span>·<span·class="mi">2</span> |
| 188 | </pre></div> | 188 | </pre></div> |
| 189 | </div> | 189 | </div> |
| 190 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0. | 190 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.156·seconds)</p> |
| 191 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-topological-sort-py"> | 191 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-topological-sort-py"> |
| 192 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 192 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 193 | <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 | <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> |
| 194 | </div> | 194 | </div> |
| 195 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 195 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 196 | <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 | <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> |
| 197 | </div> | 197 | </div> |
| Offset 95, 15 lines modified | Offset 95, 15 lines modified | ||
| 95 | [topological·sort] | 95 | [topological·sort] |
| 96 | degree·of·0:·0 | 96 | degree·of·0:·0 |
| 97 | degree·of·1:·1 | 97 | degree·of·1:·1 |
| 98 | degree·of·2:·1 | 98 | degree·of·2:·1 |
| 99 | degree·of·3:·2 | 99 | degree·of·3:·2 |
| 100 | degree·of·4:·1 | 100 | degree·of·4:·1 |
| 101 | degree·of·5:·2 | 101 | degree·of·5:·2 |
| 102 | Total·running·time·of·the·script:·(0·minutes·0. | 102 | Total·running·time·of·the·script:·(0·minutes·0.156·seconds) |
| 103 | Download_Jupyter_notebook:_topological_sort.ipynb | 103 | Download_Jupyter_notebook:_topological_sort.ipynb |
| 104 | Download_Python_source_code:_topological_sort.py | 104 | Download_Python_source_code:_topological_sort.py |
| 105 | Download_zipped:_topological_sort.zip | 105 | Download_zipped:_topological_sort.zip |
| 106 | Gallery_generated_by_Sphinx-Gallery | 106 | Gallery_generated_by_Sphinx-Gallery |
| 107 | Previous | 107 | Previous |
| 108 | Next | 108 | Next |
| Offset 201, 15 lines modified | Offset 201, 15 lines modified | ||
| 201 | ········<span·class="mi">30</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·0</span> | 201 | ········<span·class="mi">30</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·0</span> |
| 202 | ········<span·class="mi">80</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·1</span> | 202 | ········<span·class="mi">80</span><span·class="p">,</span>··<span·class="c1">#·loop·for·vertex·1</span> |
| 203 | ····<span·class="p">],</span> | 203 | ····<span·class="p">],</span> |
| 204 | <span·class="p">)</span> | 204 | <span·class="p">)</span> |
| 205 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 205 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 206 | </pre></div> | 206 | </pre></div> |
| 207 | </div> | 207 | </div> |
| 208 | <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· | 208 | <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·4.052·seconds)</p> |
| 209 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visual-style-py"> | 209 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visual-style-py"> |
| 210 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 210 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 211 | <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 | <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> |
| 212 | </div> | 212 | </div> |
| 213 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 213 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 214 | <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 | <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> |
| 215 | </div> | 215 | </div> |
| Offset 110, 15 lines modified | Offset 110, 15 lines modified | ||
| 110 | ········0,··#·ignored,·the·first·edge·is·not·a·loop | 110 | ········0,··#·ignored,·the·first·edge·is·not·a·loop |
| 111 | ········30,··#·loop·for·vertex·0 | 111 | ········30,··#·loop·for·vertex·0 |
| 112 | ········80,··#·loop·for·vertex·1 | 112 | ········80,··#·loop·for·vertex·1 |
| 113 | ····], | 113 | ····], |
| 114 | ) | 114 | ) |
| 115 | plt.show() | 115 | plt.show() |
| 116 | [visual·style] | 116 | [visual·style] |
| 117 | Total·running·time·of·the·script:·(0·minutes· | 117 | Total·running·time·of·the·script:·(0·minutes·4.052·seconds) |
| 118 | Download_Jupyter_notebook:_visual_style.ipynb | 118 | Download_Jupyter_notebook:_visual_style.ipynb |
| 119 | Download_Python_source_code:_visual_style.py | 119 | Download_Python_source_code:_visual_style.py |
| 120 | Download_zipped:_visual_style.zip | 120 | Download_zipped:_visual_style.zip |
| 121 | Gallery_generated_by_Sphinx-Gallery | 121 | Gallery_generated_by_Sphinx-Gallery |
| 122 | Previous | 122 | Previous |
| 123 | Next | 123 | Next |
| Offset 180, 15 lines modified | Offset 180, 15 lines modified | ||
| 180 | ········<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">,</span> | 180 | ········<span·class="n">vertex_size</span><span·class="o">=</span><span·class="mi">5</span><span·class="p">,</span> |
| 181 | ········<span·class="n">target</span><span·class="o">=</span><span·class="n">ax</span><span·class="p">,</span> | 181 | ········<span·class="n">target</span><span·class="o">=</span><span·class="n">ax</span><span·class="p">,</span> |
| 182 | ····<span·class="p">)</span> | 182 | ····<span·class="p">)</span> |
| 183 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">axis</span><span·class="p">(</span><span·class="s2">"off"</span><span·class="p">)</span> | 183 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">axis</span><span·class="p">(</span><span·class="s2">"off"</span><span·class="p">)</span> |
| 184 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 184 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 185 | </pre></div> | 185 | </pre></div> |
| 186 | </div> | 186 | </div> |
| 187 | <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· | 187 | <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·13.758·seconds)</p> |
| 188 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-cliques-py"> | 188 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-cliques-py"> |
| 189 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 189 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 190 | <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> | 190 | <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> |
| 191 | </div> | 191 | </div> |
| 192 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 192 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 193 | <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> | 193 | <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> |
| 194 | </div> | 194 | </div> |
| Offset 94, 15 lines modified | Offset 94, 15 lines modified | ||
| 94 | ········palette=ig.RainbowPalette(), | 94 | ········palette=ig.RainbowPalette(), |
| 95 | ········vertex_size=5, | 95 | ········vertex_size=5, |
| 96 | ········target=ax, | 96 | ········target=ax, |
| 97 | ····) | 97 | ····) |
| 98 | plt.axis("off") | 98 | plt.axis("off") |
| 99 | plt.show() | 99 | plt.show() |
| 100 | [visualize·cliques] | 100 | [visualize·cliques] |
| 101 | Total·running·time·of·the·script:·(0·minutes· | 101 | Total·running·time·of·the·script:·(0·minutes·13.758·seconds) |
| 102 | Download_Jupyter_notebook:_visualize_cliques.ipynb | 102 | Download_Jupyter_notebook:_visualize_cliques.ipynb |
| 103 | Download_Python_source_code:_visualize_cliques.py | 103 | Download_Python_source_code:_visualize_cliques.py |
| 104 | Download_zipped:_visualize_cliques.zip | 104 | Download_zipped:_visualize_cliques.zip |
| 105 | Gallery_generated_by_Sphinx-Gallery | 105 | Gallery_generated_by_Sphinx-Gallery |
| 106 | Previous | 106 | Previous |
| 107 | Next | 107 | Next |
| Offset 176, 15 lines modified | Offset 176, 15 lines modified | ||
| 176 | ····<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> | 176 | ····<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> |
| 177 | <span·class="p">)</span> | 177 | <span·class="p">)</span> |
| 178 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> | 178 | <span·class="n">plt</span><span·class="o">.</span><span·class="n">show</span><span·class="p">()</span> |
| 179 | </pre></div> | 179 | </pre></div> |
| 180 | </div> | 180 | </div> |
| 181 | <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, | 181 | <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, |
| 182 | check·out·<a·class="reference·internal"·href="cluster_contraction.html#tutorials-cluster-graph"><span·class="std·std-ref">Generating·Cluster·Graphs</span></a>.</p> | 182 | check·out·<a·class="reference·internal"·href="cluster_contraction.html#tutorials-cluster-graph"><span·class="std·std-ref">Generating·Cluster·Graphs</span></a>.</p> |
| 183 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes· | 183 | <p·class="sphx-glr-timing"><strong>Total·running·time·of·the·script:</strong>·(0·minutes·0.682·seconds)</p> |
| 184 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-communities-py"> | 184 | <div·class="sphx-glr-footer·sphx-glr-footer-example·docutils·container"·id="sphx-glr-download-tutorials-visualize-communities-py"> |
| 185 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> | 185 | <div·class="sphx-glr-download·sphx-glr-download-jupyter·docutils·container"> |
| 186 | <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> | 186 | <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> |
| 187 | </div> | 187 | </div> |
| 188 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> | 188 | <div·class="sphx-glr-download·sphx-glr-download-python·docutils·container"> |
| 189 | <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> | 189 | <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> |
| 190 | </div> | 190 | </div> |
| Offset 91, 15 lines modified | Offset 91, 15 lines modified | ||
| 91 | ····bbox_to_anchor=(0,·1.0), | 91 | ····bbox_to_anchor=(0,·1.0), |
| 92 | ····bbox_transform=ax.transAxes, | 92 | ····bbox_transform=ax.transAxes, |
| 93 | ) | 93 | ) |
| 94 | plt.show() | 94 | plt.show() |
| 95 | [visualize·communities] | 95 | [visualize·communities] |
| 96 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, | 96 | For·an·example·on·how·to·generate·the·cluster·graph·from·a·vertex·cluster, |
| 97 | check·out·Generating_Cluster_Graphs. | 97 | check·out·Generating_Cluster_Graphs. |
| 98 | Total·running·time·of·the·script:·(0·minutes· | 98 | Total·running·time·of·the·script:·(0·minutes·0.682·seconds) |
| 99 | Download_Jupyter_notebook:_visualize_communities.ipynb | 99 | Download_Jupyter_notebook:_visualize_communities.ipynb |
| 100 | Download_Python_source_code:_visualize_communities.py | 100 | Download_Python_source_code:_visualize_communities.py |
| 101 | Download_zipped:_visualize_communities.zip | 101 | Download_zipped:_visualize_communities.zip |
| 102 | Gallery_generated_by_Sphinx-Gallery | 102 | Gallery_generated_by_Sphinx-Gallery |
| 103 | Previous | 103 | Previous |
| 104 | Next | 104 | Next |
| 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· | 290 | Total·running·time·of·the·script:·(0·minutes·0.660·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·1.0.0 | 328 | \xcigraph·Documentation,·Release·1.0.0 |
| 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· | 331 | Total·running·time·of·the·script:·(0·minutes·0.868·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· | 375 | Total·running·time·of·the·script:·(0·minutes·1.729·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·1.0.0 | 412 | \xcigraph·Documentation,·Release·1.0.0 |
| 413 | Total·running·time·of·the·script:·(0·minutes·0. | 413 | Total·running·time·of·the·script:·(0·minutes·0.718·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 446, 15 lines modified | Offset 446, 15 lines modified | ||
| 446 | 2.2.·Gallery·of·Examples | 446 | 2.2.·Gallery·of·Examples |
| 447 | 15 | 447 | 15 |
| 448 | \xcigraph·Documentation,·Release·1.0.0 | 448 | \xcigraph·Documentation,·Release·1.0.0 |
| 449 | Total·running·time·of·the·script:·(0·minutes·0. | 449 | Total·running·time·of·the·script:·(0·minutes·0.139·seconds) |
| 450 | 2.2.6·Minimum·Spanning·Trees | 450 | 2.2.6·Minimum·Spanning·Trees |
| 451 | This·example·shows·how·to·generate·a·minimum·spanning·tree·from·an·input·graph·using·igraph.Graph. | 451 | This·example·shows·how·to·generate·a·minimum·spanning·tree·from·an·input·graph·using·igraph.Graph. |
| 452 | spanning_tree().·If·you·only·need·a·regular·spanning·tree,·check·out·Spanning·Trees. | 452 | spanning_tree().·If·you·only·need·a·regular·spanning·tree,·check·out·Spanning·Trees. |
| 453 | import·random | 453 | import·random |
| 454 | import·igraph·as·ig | 454 | import·igraph·as·ig |
| 455 | import·matplotlib.pyplot·as·plt | 455 | import·matplotlib.pyplot·as·plt |
| Offset 495, 15 lines modified | Offset 495, 15 lines modified | ||
| 495 | 2.2.·Gallery·of·Examples | 495 | 2.2.·Gallery·of·Examples |
| 496 | 17 | 496 | 17 |
| 497 | \xcigraph·Documentation,·Release·1.0.0 | 497 | \xcigraph·Documentation,·Release·1.0.0 |
| 498 | Total·running·time·of·the·script:·(0·minutes· | 498 | Total·running·time·of·the·script:·(0·minutes·0.508·seconds) |
| 499 | 2.2.7·Spanning·Trees | 499 | 2.2.7·Spanning·Trees |
| 500 | This·example·shows·how·to·generate·a·spanning·tree·from·an·input·graph·using·igraph.Graph.spanning_tree(). | 500 | This·example·shows·how·to·generate·a·spanning·tree·from·an·input·graph·using·igraph.Graph.spanning_tree(). |
| 501 | For·the·related·idea·of·finding·a·minimum·spanning·tree,·see·Minimum·Spanning·Trees. | 501 | For·the·related·idea·of·finding·a·minimum·spanning·tree,·see·Minimum·Spanning·Trees. |
| 502 | import·igraph·as·ig | 502 | import·igraph·as·ig |
| 503 | import·matplotlib.pyplot·as·plt | 503 | import·matplotlib.pyplot·as·plt |
| 504 | import·random | 504 | import·random |
| Offset 547, 15 lines modified | Offset 547, 15 lines modified | ||
| 547 | 19 | 547 | 19 |
| 548 | \xcigraph·Documentation,·Release·1.0.0 | 548 | \xcigraph·Documentation,·Release·1.0.0 |
| 549 | Note | 549 | Note |
| 550 | 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(). | 550 | 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(). |
| 551 | Total·running·time·of·the·script:·(0·minutes· | 551 | Total·running·time·of·the·script:·(0·minutes·0.633·seconds) |
| 552 | 2.2.8·Complement | 552 | 2.2.8·Complement |
| 553 | This·example·shows·how·to·generate·the·complement·graph·of·a·graph·(sometimes·known·as·the·anti-graph)·using | 553 | This·example·shows·how·to·generate·the·complement·graph·of·a·graph·(sometimes·known·as·the·anti-graph)·using |
| 554 | igraph.GraphBase.complementer(). | 554 | igraph.GraphBase.complementer(). |
| 555 | import·igraph·as·ig | 555 | import·igraph·as·ig |
| 556 | import·matplotlib.pyplot·as·plt | 556 | import·matplotlib.pyplot·as·plt |
| 557 | import·random | 557 | import·random |
| Offset 613, 15 lines modified | Offset 613, 15 lines modified | ||
| 613 | target=axs[1,·1], | 613 | target=axs[1,·1], |
| 614 | layout="circle", | 614 | layout="circle", |
| 615 | vertex_color="black", | 615 | vertex_color="black", |
| 616 | ) | 616 | ) |
| 617 | axs[1,·1].set_title("Complement·of·union·graph") | 617 | axs[1,·1].set_title("Complement·of·union·graph") |
| 618 | plt.show() | 618 | plt.show() |
| 619 | Total·running·time·of·the·script:·(0·minutes· | 619 | Total·running·time·of·the·script:·(0·minutes·0.762·seconds) |
| 620 | 2.2.·Gallery·of·Examples | 620 | 2.2.·Gallery·of·Examples |
| 621 | 21 | 621 | 21 |
| 622 | \xcigraph·Documentation,·Release·1.0.0 | 622 | \xcigraph·Documentation,·Release·1.0.0 |
| Max diff block lines reached; 13285/17782 bytes (74.71%) of diff not shown. | |||