.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/visualize/plot_sync_panel.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_sync_panel.py: Time series and order parameter ================================ :func:`~hypersynchronization.plot_sync` combines the oscillator time series, the order parameters R1 and R2, and phase snapshots at t=0 and t=T. .. GENERATED FROM PYTHON SOURCE LINES 8-35 .. image-sg:: /auto_examples/visualize/images/sphx_glr_plot_sync_panel_001.png :alt: plot sync panel :srcset: /auto_examples/visualize/images/sphx_glr_plot_sync_panel_001.png :class: sphx-glr-single-img .. code-block:: Python import matplotlib.pyplot as plt import numpy as np import xgi import hypersynchronization as hs N = 20 rng = np.random.default_rng(42) H = xgi.complete_hypergraph(N, max_order=2) links = H.edges.filterby("order", 1).members() triangles = H.edges.filterby("order", 2).members() thetas, times = hs.simulate_kuramoto( H, omega=rng.normal(0, 0.1, N), theta_0=hs.generate_state(N, kind="random", seed=42), t_end=30, dt=0.1, rhs=hs.rhs_23_sym, integrator="RK45", args=(2.0, 1.0, links, triangles), ) fig, axs = hs.plot_sync(thetas, times) plt.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.632 seconds) .. _sphx_glr_download_auto_examples_visualize_plot_sync_panel.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_sync_panel.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_sync_panel.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_sync_panel.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_