From 12d8e7c9c0eb3862616bd86f42824b813aee0413 Mon Sep 17 00:00:00 2001 From: ecb373be3df922673e97a5f0c79ec05c Date: Thu, 13 Oct 2022 15:05:36 +0000 Subject: [PATCH] plotting line --- module2/exo3/exercice.ipynb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/module2/exo3/exercice.ipynb b/module2/exo3/exercice.ipynb index 5e8e441..e6ac4fd 100644 --- a/module2/exo3/exercice.ipynb +++ b/module2/exo3/exercice.ipynb @@ -52,6 +52,37 @@ "plt.show" ] }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "i = 0\n", + "yAxis = []\n", + "\n", + "for element in dataset:\n", + " yAxis.append(i)\n", + " i += 1\n", + " \n", + "plt.plot(dataset,\n", + " yAxis,\n", + " color='b',\n", + " linewidth=1)\n", + "\n", + "plt.rc('grid', linestyle='-', linewidth=1)\n", + "plt.grid(True)\n", + "\n", + "plt.show()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, { "cell_type": "code", "execution_count": null, -- 2.18.1