.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/structures/plot_directed_hypergraph.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_auto_examples_structures_plot_directed_hypergraph.py: ======================= Directed hypegraph ======================= Draw a directed hypergraph. .. GENERATED FROM PYTHON SOURCE LINES 8-20 .. image-sg:: /auto_examples/structures/images/sphx_glr_plot_directed_hypergraph_001.png :alt: plot directed hypergraph :srcset: /auto_examples/structures/images/sphx_glr_plot_directed_hypergraph_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import networkx as nx import xgi # generate from a list DH = xgi.DiHypergraph([[{1, 2}, {5, 6}], [{4}, {1, 3}]]) xgi.draw_bipartite(DH) plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.047 seconds) .. _sphx_glr_download_auto_examples_structures_plot_directed_hypergraph.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_directed_hypergraph.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_directed_hypergraph.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_directed_hypergraph.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_