{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "table = pd.read_csv(\"good_data.csv\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "table"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "fig, ax = plt.subplots(1, 1)\n",
    "fig.suptitle('ecg')\n",
    "\n",
    "y = table[[\"ECG\"]].to_numpy()\n",
    "x = np.arange(0, y.shape[0])\n",
    "\n",
    "fig.set_size_inches(200, 16)\n",
    "\n",
    "ax.plot(x, y)\n",
    "\n",
    "#plt.savefig('ecg.png', dpi=100, bbox_inches='tight' )\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "fig, figure_parts = plt.subplots(4, 6)\n",
    "fig.suptitle('on body')\n",
    "\n",
    "for index, column_title in enumerate(table.columns.to_list()):\n",
    "    column = table[[column_title]].to_numpy()\n",
    "    \n",
    "    x = np.arange(0, column.shape[0]) \n",
    "    y = column\n",
    "    \n",
    "    ax = figure_parts[index//6][index%6]\n",
    "    ax.set_xlabel(column_title)\n",
    "    ax.plot(x, y)\n",
    "    \n",
    "fig.set_size_inches(26, 16)\n",
    "plt.savefig('On body.png',dpi=100, bbox_inches='tight' )\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "x = np.arange(0, 360)\n",
    "y = np.sin(np.radians(x))\n",
    "\n",
    "plt.plot(x, y)\n",
    "plt.savefig(\"sine wave.png\", dpi=100)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "fig, figure_parts = plt.subplots(3, 2)\n",
    "fig.suptitle('yingshaoxo: This is life')\n",
    "\n",
    "degree = 0\n",
    "\n",
    "for index in range(3 * 2):\n",
    "    random_num = np.random.randint(180, 360, size=1)[0]\n",
    "    \n",
    "    x = np.arange(degree, degree + random_num) \n",
    "    y = np.sin(np.radians(x))\n",
    "    degree += random_num\n",
    "    \n",
    "    ax = figure_parts[index//2][index%2]\n",
    "    ax.set_xlabel(str(index))\n",
    "    ax.plot(x, y)\n",
    "    \n",
    "fig.set_size_inches(19, 12)\n",
    "plt.savefig('this is life.png', dpi=100, bbox_inches='tight' )\n",
    "plt.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.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}