.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/visualize/plot_phases_ring.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_visualize_plot_phases_ring.py: Phases on a ring ================ :func:`~hypersynchronization.plot_phases_ring` places oscillators on a circle and colours each node by its phase value. .. GENERATED FROM PYTHON SOURCE LINES 8-22 .. image-sg:: /auto_examples/visualize/images/sphx_glr_plot_phases_ring_001.png :alt: plot phases ring :srcset: /auto_examples/visualize/images/sphx_glr_plot_phases_ring_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import xgi import hypersynchronization as hs N = 20 H = xgi.complete_hypergraph(N, max_order=2) theta = hs.generate_k_clusters(N, k=2, ps=[0.5, 0.5], noise=0, seed=0) fig, ax = plt.subplots(figsize=(4, 4)) hs.plot_phases_ring(H, theta, ax=ax, node_size=15) plt.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.049 seconds) .. _sphx_glr_download_auto_examples_visualize_plot_phases_ring.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_phases_ring.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_phases_ring.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_phases_ring.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_