In [1]:
%pylab inline
import pandas as pd
import matplotlib.pylab as plt
df = pd.read_csv('../datasets/iris.csv')
setosa = df[df.Species=='Iris-setosa']
versicolor = df[df.Species=='Iris-versicolor']
virginica = df[df.Species=='Iris-virginica']
s = plot(setosa['SepalLength'],setosa['PetalLength'],'bo')
vi = plot(virginica['SepalLength'],virginica['PetalLength'],'go')
ve = plot(versicolor['SepalLength'],versicolor['PetalLength'],'ro')
lx = ve[0].axes.set_xlabel('Sepal Length')
ly = ve[0].axes.set_ylabel('Petal Length')
In [2]:
s = plot(setosa['SepalWidth'],setosa['PetalWidth'],'bo')
vi = plot(virginica['SepalWidth'],virginica['PetalWidth'],'go')
ve = plot(versicolor['SepalWidth'],versicolor['PetalWidth'],'ro')
lx = ve[0].axes.set_xlabel('Sepal Width')
ly = ve[0].axes.set_ylabel('Petal Width')
In [3]:
s = plot(setosa['SepalLength'],setosa['PetalWidth'],'bo')
vi = plot(virginica['SepalLength'],virginica['PetalWidth'],'go')
ve = plot(versicolor['SepalLength'],versicolor['PetalWidth'],'ro')
lx = ve[0].axes.set_xlabel('Sepal Length')
ly = ve[0].axes.set_ylabel('Petal Width')
In [4]:
s = plot(setosa['SepalWidth'],setosa['PetalLength'],'bo')
vi = plot(virginica['SepalWidth'],virginica['PetalLength'],'go')
ve = plot(versicolor['SepalWidth'],versicolor['PetalLength'],'ro')
lx = ve[0].axes.set_xlabel('Sepal Width')
ly = ve[0].axes.set_ylabel('Petal Length')
In [ ]: