.. 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_13_circular_and_interactive.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_13_circular_and_interactive.py: Circular drawing and the interactive HTML viewer ================================================ The circular drawing puts the vertices on a circle in seriated order and draws every hyperedge as a hub with curved spokes. ``hv.to_html`` writes a self-contained HTML page with draggable vertices, recomputed hulls, layout switching, group toggles and SVG export — the browser successor of the HyperGodot interface. .. GENERATED FROM PYTHON SOURCE LINES 13-32 .. image-sg:: /auto_examples/03_node_link/images/sphx_glr_plot_13_circular_and_interactive_001.png :alt: seriated order, original order :srcset: /auto_examples/03_node_link/images/sphx_glr_plot_13_circular_and_interactive_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none production.html 13 kB | .. code-block:: Python import pathlib import tempfile import matplotlib.pyplot as plt import hatvis as hv from hatvis.plotting import draw_circular H = hv.datasets.load_manufacturing_cps() fig, axes = plt.subplots(1, 2, figsize=(12, 5.6)) draw_circular(H, ax=axes[0], order="seriation", title="seriated order") draw_circular(H, ax=axes[1], order="given", title="original order") plt.tight_layout() # [snippet:html] path = pathlib.Path(tempfile.mkdtemp()) / "production.html" hv.to_html(H, path, group="group", title="Cyber-physical production (HyperGodot example)") # [/snippet:html] print(path.name, path.stat().st_size // 1024, "kB") .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.489 seconds) .. _sphx_glr_download_auto_examples_03_node_link_plot_13_circular_and_interactive.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_13_circular_and_interactive.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_13_circular_and_interactive.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_13_circular_and_interactive.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_13_circular_and_interactive.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_