...

/

Scatter, Area, and Stacked Bar Plots

Scatter, Area, and Stacked Bar Plots

Explore the scatter plots, area plots, and stacked bar plots, column distributions with KDEs, histograms, and box plots of pandas.

Scatter plots

A scatter plot is useful to determine the relationship between two columns that are numeric. We can evaluate what tends to happen to one value as the other value changes. Here is a scatter plot to examine the relationship between Integrity and Avoid_crucial_mistakes:

Press + to interact
(pres
.plot.scatter(x='Integrity', y='Avoid_crucial_mistakes')
)

It appears that as the rank for integrity falls, so does the rank for avoiding crucial mistakes. Indeed, the Pearson correlation coefficient also seems to indicate this:

Press + to interact
print(pres.Integrity.corr(pres.Avoid_crucial_mistakes))

...