from numpy import array
import matplotlib
import matplotlib.pyplot as plt
from fileread import file2matrix
datingDataMat,datingLabels = file2matrix('iris_data.txt')
fig = plt.figure()
ax = fig.add_subplot(111)
ax.scatter(datingDataMat[:,1], datingDataMat[:,2],15.0*array(datingLabels), 15.0*array(datingLabels))
plt.show()
This code is displaying error as::
TypeError: unsupported operand type(s) for *: 'float' and 'numpy.ndarray'
According to the author i should be able to generate different colors based on datalabels.