Python för R-användare
Daniel Chen
Instructor
plot()kind-argumentet till plotline : linjediagram (standard)bar : vertikalt stapeldiagrambarh : horisontellt stapeldiagramhist : histogrambox : boxplotkde : kärntäthetsskattningdensity : samma som 'kde'area : ytdiagrampie : cirkeldiagramscatter : spridningsdiagramhexbin : hexbin-diagramimport 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 för R-användare