mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-02-01 12:37:49 +01:00
Correction of a typo
Current version produces the following error: AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
This commit is contained in:
@@ -2697,7 +2697,7 @@
|
|||||||
" coeffs = silhouette_coefficients[y_pred == i]\n",
|
" coeffs = silhouette_coefficients[y_pred == i]\n",
|
||||||
" coeffs.sort()\n",
|
" coeffs.sort()\n",
|
||||||
"\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",
|
" plt.fill_betweenx(np.arange(pos, pos + len(coeffs)), 0, coeffs,\n",
|
||||||
" facecolor=color, edgecolor=color, alpha=0.7)\n",
|
" facecolor=color, edgecolor=color, alpha=0.7)\n",
|
||||||
" ticks.append(pos + len(coeffs) // 2)\n",
|
" ticks.append(pos + len(coeffs) // 2)\n",
|
||||||
|
|||||||
Reference in New Issue
Block a user