.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/03_node_link/plot_10_hyperedge_styles.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 or to run this example in your browser via Binder. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_03_node_link_plot_10_hyperedge_styles.py: Seven ways to draw a hyperedge ============================== With fixed vertex positions, hyperedges can be drawn as padded convex hulls (HyperGodot), rounded hulls, implicit isocontours that avoid non-members (Bubble Sets style), minimum-volume ellipses (as in the HAT-VIS scripts), filled polygons (XGI style), stars from a hub node (star expansion) or minimum spanning trees (HAT-VIS). .. GENERATED FROM PYTHON SOURCE LINES 13-29 .. image-sg:: /auto_examples/03_node_link/images/sphx_glr_plot_10_hyperedge_styles_001.png :alt: hull, smooth, bubble, ellipse, polygon, star, mst, vertex filter: C3 :srcset: /auto_examples/03_node_link/images/sphx_glr_plot_10_hyperedge_styles_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import hatvis as hv from hatvis.plotting import draw_hypergraph H = hv.datasets.load_manufacturing_cps() pos = hv.layout_membership(H, random_state=0) styles = ["hull", "smooth", "bubble", "ellipse", "polygon", "star", "mst"] fig, axes = plt.subplots(2, 4, figsize=(17, 8.5)) for ax, style in zip(axes.ravel(), styles, strict=False): # [snippet:style] draw_hypergraph(H, pos=pos, style=style, ax=ax, legend=False, title=style, labels=False) # [/snippet:style] draw_hypergraph(H, pos=pos, style="smooth", ax=axes[1, 3], highlight="C3", legend=False, title="vertex filter: C3", labels=True) plt.tight_layout() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.955 seconds) .. _sphx_glr_download_auto_examples_03_node_link_plot_10_hyperedge_styles.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: binder-badge .. image:: images/binder_badge_logo.svg :target: https://mybinder.org/v2/gh/ComplexSystemsIntelligence/hatvis/main?urlpath=lab/tree/notebooks/auto_examples/03_node_link/plot_10_hyperedge_styles.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_10_hyperedge_styles.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_10_hyperedge_styles.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_10_hyperedge_styles.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_