Correction of a typo
Current version produces the following error: AttributeError: module 'matplotlib.cm' has no attribute 'spectral'main
parent
50aeba2e67
commit
b9269e7207
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue