text_plain_output_1.png
import matplotlib.pyplot as plt

import pandas as pd

data = pd.read_csv('../input/Iris.csv')
data

features = ['PetalLengthCm', 'PetalWidthCm']

color_dict = {'Iris-setosa': 'darkred', 'Iris-versicolor': 'Yellow', 'Iris-virginica': 'Green'}
names_dict = {'Iris-setosa': 'Setosa', 'Iris-versicolor': 'Versicolor', 'Iris-virginica': 'Virginica'}
for species in color_dict.keys():
    plt.scatter(data[data.Species == species][features[0]], data[data.Species == species][features[1]], c=color_dict[species], label=names_dict[species])
plt.xlabel(features[0])
plt.ylabel(features[1])
plt.title('Scatterplot')
plt.legend()