.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/style/plot_edgepadding.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_gallery_style_plot_edgepadding.py: Edge shrink =========== This example illustrates how to shrink edges, i.e. leave a bit of empty space between edge cap (end) and the border of its source/target vertices. .. GENERATED FROM PYTHON SOURCE LINES 8-38 .. image-sg:: /gallery/style/images/sphx_glr_plot_edgepadding_001.png :alt: plot edgepadding :srcset: /gallery/style/images/sphx_glr_plot_edgepadding_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none [] | .. code-block:: Python import iplotx as ipx graph = { "edges": [ ("A", "B"), ("B", "C"), ("C", "D"), ("C", "E"), ("E", "Bingo"), ], "directed": True, } layout = { "A": (0, 0), "B": (1, 0), "C": (1, 1), "D": (-1, 1), "E": (-0.5, 2), "Bingo": (0, 3), } ipx.network( graph, layout, style="rededge", edge_shrink=5, vertex_labels=True, vertex_size={"A": 20, "B": 20, "C": 20, "D": 20, "E": 20, "Bingo": 50}, ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.040 seconds) .. _sphx_glr_download_gallery_style_plot_edgepadding.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_edgepadding.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_edgepadding.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_edgepadding.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_