April 2018
Beginner to intermediate
300 pages
7h 34m
English
We can easily create bar plots with multiple data series with Pandas df.plot(). This API also allows us to easily add error bars by supplying the xerr and yerr parameters. Let's have a look at an example that demonstrates the usage of this function along with bar property adjustment. The following code snippet draws a multibar plot to show the performance of an imaginary drug to treat inflammation, by comparing the level of an inflammatory protein before and after treatment of a drug and placebo as control:
import pandas as pdimport matplotlib.pyplot as plt# Prepare the data serieslabels_drug = ['Drug (Before)', 'Drug (After)']labels_placebo = ['Placebo (Before)', 'Drug (After)'] ...
Read now
Unlock full access