.. 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_11_groups.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_11_groups.py: Comparing groups: human and machine work ======================================== HyperGodot introduced group tags to overlay hypergraphs. In the cyber-physical production example every task is tagged ``H`` (human) or ``M`` (machine); line styles distinguish the groups, line widths show the processing times and vertex sizes the number of tasks of an entity. .. GENERATED FROM PYTHON SOURCE LINES 12-25 .. image-sg:: /auto_examples/03_node_link/images/sphx_glr_plot_11_groups_001.png :alt: plot 11 groups :srcset: /auto_examples/03_node_link/images/sphx_glr_plot_11_groups_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none hyperedges total minutes mean minutes mean size vertices most involved H 5 85.0 17.0 3.6 11 C3 M 2 45.0 22.5 4.0 7 C2 most central entity: C3 4 | .. code-block:: Python import matplotlib.pyplot as plt import hatvis as hv from hatvis.plotting import draw_hypergraph H = hv.datasets.load_manufacturing_cps() # [snippet:groups] print(hv.temporal.group_statistics(H, "group", weight_name="minutes")) fig, ax = plt.subplots(figsize=(8, 6.5)) draw_hypergraph(H, layout="force", group="group", width_by="weight", size_by="degree", edge_labels=True, random_state=3, ax=ax) # [/snippet:groups] print("most central entity:", H.degrees().idxmax(), H.degrees().max()) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.228 seconds) .. _sphx_glr_download_auto_examples_03_node_link_plot_11_groups.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_11_groups.ipynb :alt: Launch binder :width: 150 px .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_11_groups.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_11_groups.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_11_groups.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_