From 80e59e1dd113776b95e1a5ddc131ef282abb6a57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Geron?= Date: Sat, 14 Oct 2017 18:20:18 +0200 Subject: [PATCH] Fix call to matplotlib plot_surface() to support Matplotlib 2.1.0 --- 05_support_vector_machines.ipynb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/05_support_vector_machines.ipynb b/05_support_vector_machines.ipynb index aa85276..687d74b 100644 --- a/05_support_vector_machines.ipynb +++ b/05_support_vector_machines.ipynb @@ -1017,7 +1017,8 @@ " boundary_x2s = -x1s*(w[0]/w[1])-b/w[1]\n", " margin_x2s_1 = -x1s*(w[0]/w[1])-(b-1)/w[1]\n", " margin_x2s_2 = -x1s*(w[0]/w[1])-(b+1)/w[1]\n", - " ax.plot_surface(x1s, x2, 0, color=\"b\", alpha=0.2, cstride=100, rstride=100)\n", + " ax.plot_surface(x1s, x2, np.zeros_like(x1),\n", + " color=\"b\", alpha=0.2, cstride=100, rstride=100)\n", " ax.plot(x1s, boundary_x2s, 0, \"k-\", linewidth=2, label=r\"$h=0$\")\n", " ax.plot(x1s, margin_x2s_1, 0, \"k--\", linewidth=2, label=r\"$h=\\pm 1$\")\n", " ax.plot(x1s, margin_x2s_2, 0, \"k--\", linewidth=2)\n",