Correction of a typo

Current version produces the following error:

AttributeError: module 'matplotlib.cm' has no attribute 'spectral'
main
kaksat 2018-08-06 21:57:40 +02:00
parent 50aeba2e67
commit b9269e7207
1 changed files with 1 additions and 1 deletions

View File

@ -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",