{
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "%matplotlib inline"
      ]
    },
    {
      "cell_type": "markdown",
      "metadata": {},
      "source": [
        "\n# Joint Recurrence Plot\n\nThis example shows how to transform a multivariate time series into a joint\nrecurrence plot using :class:`pyts.multivariate.image.JointRecurrencePlot`.\n"
      ]
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "metadata": {
        "collapsed": false
      },
      "outputs": [],
      "source": [
        "import matplotlib.pyplot as plt\nfrom pyts.multivariate.image import JointRecurrencePlot\nfrom pyts.datasets import load_basic_motions\n\nX, _, _, _ = load_basic_motions(return_X_y=True)\n\n# Recurrence plot transformation\njrp = JointRecurrencePlot(threshold='point', percentage=50)\nX_jrp = jrp.fit_transform(X)\n\n# Show the results for the first time series\nplt.figure(figsize=(6, 6))\nplt.imshow(X_jrp[0], cmap='binary', origin='lower')\nplt.title('Joint Recurrence Plot', fontsize=18)\nplt.show()"
      ]
    }
  ],
  "metadata": {
    "kernelspec": {
      "display_name": "Python 3",
      "language": "python",
      "name": "python3"
    },
    "language_info": {
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      },
      "file_extension": ".py",
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "pygments_lexer": "ipython3",
      "version": "3.7.3"
    }
  },
  "nbformat": 4,
  "nbformat_minor": 0
}