.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "gallery/other/plot_feedbacks.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_other_plot_feedbacks.py: Feedback loops ============== Graphs with arrows and bars are commonly used to represent feedback loops in systems. This example shows how to obtain that effect in ``iplotx``. .. GENERATED FROM PYTHON SOURCE LINES 8-55 .. image-sg:: /gallery/other/images/sphx_glr_plot_feedbacks_001.png :alt: plot feedbacks :srcset: /gallery/other/images/sphx_glr_plot_feedbacks_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none [] | .. code-block:: Python import numpy as np import matplotlib.pyplot as plt import iplotx as ipx graph = { "edges": [ ("A", "B"), ("B", "C"), ("C", "A"), ], "directed": True, } layout = { "A": (0, 0), "B": (1, 0), "C": (0.5, 0.5 * 1.73), } fig, ax = plt.subplots() ipx.network( graph, layout, ax=ax, vertex_size=50, edge_linewidth=5, edge_arrow_width=30, edge_arrow_height=40, edge_arrow_marker=[")>", "|", "|"], edge_shrink=15, edge_curved=True, edge_tension=[2, 2, 2], vertex_facecolor=["#26677FFF", "#635C72FF", "#89374FFF"], vertex_edgecolor="black", vertex_linewidth=5, aspect=1.0, margins=0.1, ) # Add a parametric spiral t = np.linspace(0, 4 * np.pi, 400) ax.plot( 0.5 + np.cos(t + np.pi) * t / 40, 0.31 + np.sin(t + np.pi) * t / 40, color="grey", lw=4, ) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.034 seconds) .. _sphx_glr_download_gallery_other_plot_feedbacks.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_feedbacks.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_feedbacks.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_feedbacks.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_