From b9269e720757fdb71426c8596033efcd9df833c3 Mon Sep 17 00:00:00 2001 From: kaksat Date: Mon, 6 Aug 2018 21:57:40 +0200 Subject: [PATCH] Correction of a typo Current version produces the following error: AttributeError: module 'matplotlib.cm' has no attribute 'spectral' --- 08_dimensionality_reduction.ipynb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/08_dimensionality_reduction.ipynb b/08_dimensionality_reduction.ipynb index 975d83b..e5ef84c 100644 --- a/08_dimensionality_reduction.ipynb +++ b/08_dimensionality_reduction.ipynb @@ -2697,7 +2697,7 @@ " coeffs = silhouette_coefficients[y_pred == i]\n", " coeffs.sort()\n", "\n", - " color = matplotlib.cm.spectral(i / k)\n", + " color = matplotlib.cm.Spectral(i / k)\n", " plt.fill_betweenx(np.arange(pos, pos + len(coeffs)), 0, coeffs,\n", " facecolor=color, edgecolor=color, alpha=0.7)\n", " ticks.append(pos + len(coeffs) // 2)\n",