Python for R Users
Daniel Chen
Instructor
plot() methodplot the kind argumentkind of plots:line : line plot (default)bar : vertical bar plotbarh : horizontal bar plothist : histogrambox : boxplotkde : Kernel Density Estimation plotdensity : same as ‘kde’area : area plotpie : pie plotscatter : scatter plothexbin : hexbin plotimport matplotlib.pyplot as plt
iris['sepal_length'].plot(kind='hist')
plt.show()

cts = iris['species'].value_counts()
cts.plot(kind='bar')
plt.show()

iris.plot(kind='scatter', x='Sepal.Length', y='Sepal.Width')
plt.show()

iris.plot(kind='box')
plt.show()

iris.boxplot(by='Species', column='Sepal.Length')
plt.show()

Python for R Users