ValueError: 'c' argument has 1 elements, which is not acceptable for use with 'x' with size 400, 'y'


次のコードを実行します.
plt.scatter(X[0, :], X[1, :], c=Y, s=40, cmap=plt.cm.Spectral)

エラー:
ValueError: 'c' argument has 1 elements, which is not acceptable for use with 'x' with size 400, 'y' with size 400.

これはplt.scatter関数の微小な改版によるものは、以下のように修正する必要があります.
import operator
from functools import reduce
plt.scatter(X[0, :], X[1, :], c=reduce(operator.add, Y), s=40, cmap=plt.cm.Spectral) 

リンクの説明を追加