.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/multivariate/plot_joint_rp.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note Click :ref:`here ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_multivariate_plot_joint_rp.py: ===================== Joint Recurrence Plot ===================== A joint recurrence plot is an extension of recurrence plots ( implemented as :class:`pyts.image.RecurrencePlot`) for multivariate time series. A recurrence plot is built for each feature of the multivariate time series, then the set of recurrence plots is reduced to one single recurrence plot using the Hadamard product. This example illustrates this transformation. It is implemented as :class:`pyts.multivariate.image.JointRecurrencePlot`. .. GENERATED FROM PYTHON SOURCE LINES 14-34 .. image-sg:: /auto_examples/multivariate/images/sphx_glr_plot_joint_rp_001.png :alt: Joint Recurrence Plot :srcset: /auto_examples/multivariate/images/sphx_glr_plot_joint_rp_001.png :class: sphx-glr-single-img .. code-block:: default # Author: Johann Faouzi # License: BSD-3-Clause import matplotlib.pyplot as plt from pyts.multivariate.image import JointRecurrencePlot from pyts.datasets import load_basic_motions X, _, _, _ = load_basic_motions(return_X_y=True) # Recurrence plot transformation jrp = JointRecurrencePlot(threshold='point', percentage=50) X_jrp = jrp.fit_transform(X) # Show the results for the first time series plt.figure(figsize=(5, 5)) plt.imshow(X_jrp[0], cmap='binary', origin='lower') plt.title('Joint Recurrence Plot', fontsize=18) plt.tight_layout() plt.show() .. rst-class:: sphx-glr-timing **Total running time of the script:** ( 0 minutes 0.326 seconds) .. _sphx_glr_download_auto_examples_multivariate_plot_joint_rp.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_joint_rp.py ` .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_joint_rp.ipynb ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_