Created
June 13, 2018 16:25
-
-
Save grohith327/722711e97143109bd3845e1eb5d5fa9b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import matplotlib.pyplot as plt | |
points_1 = df[0:50].values.tolist() | |
points_2 = df[50:100].values.tolist() | |
points_3 = df[100:].values.tolist() | |
points_1 = np.array(points_1) | |
points_2 = np.array(points_2) | |
points_3 = np.array(points_3) | |
## Plot the data points to visualize | |
plt.figure(figsize=(16,9)) | |
plt.scatter(points_1[:,0],points_1[:,1],color='red',label='Setosa') | |
plt.scatter(points_2[:,0],points_2[:,1],color='black',label='Versicolor') | |
plt.scatter(points_3[:,0],points_3[:,1],color='green',label='Virginica') | |
plt.legend() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment