From 253e4e12a8b6ac142068b046945b8c1fe6cc2b4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Wed, 10 Nov 2021 17:59:49 +1300 Subject: [PATCH] Improve colors of diagrams min_samples_leaf_plot and sensitivity_to_rotation_plot --- 05_decision_trees.ipynb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/05_decision_trees.ipynb b/05_decision_trees.ipynb index 83e7659..febe245 100644 --- a/05_decision_trees.ipynb +++ b/05_decision_trees.ipynb @@ -363,11 +363,11 @@ " \n", " plt.contourf(x1, x2, y_pred, alpha=0.3, cmap=cmap)\n", " plt.contour(x1, x2, y_pred, cmap=\"Greys\", alpha=0.8)\n", - " colors = {\"Wistia\": [\"blue\", \"black\"], \"Pastel1\": [\"red\", \"blue\"]}[cmap]\n", - " markers = (\"s\", \"^\")\n", + " colors = {\"Wistia\": [\"#78785c\", \"#c47b27\"], \"Pastel1\": [\"red\", \"blue\"]}\n", + " markers = (\"o\", \"^\")\n", " for idx in (0, 1):\n", " plt.plot(X[:, 0][y == idx], X[:, 1][y == idx],\n", - " color=colors[idx], marker=markers[idx], linestyle=\"none\")\n", + " color=colors[cmap][idx], marker=markers[idx], linestyle=\"none\")\n", " plt.axis(axes)\n", " plt.xlabel(r\"$x_1$\")\n", " plt.ylabel(r\"$x_2$\", rotation=0)\n",