October 2018
Beginner to intermediate
676 pages
18h 30m
English
The following code block plots five graphs with three in the first grid and two in the second grid. We plot a constant error bar and a symmetric and asymmetric error bar on the first grid, and all error bars and sampled error bars on the second grid:
fig = plt.figure(figsize=(8,8))plt.style.use('seaborn-deep')
def plot_errorbar(axs, x, y, xerr=None, yerr=None, errevery=1, title=None, xlabel=None, ylabel=None, fmt=None): ax = fig.add_subplot(axs) ax.errorbar(x, y, xerr=xerr, yerr=yerr, errorevery=errevery, fmt=fmt) ax.set(title=title, xlabel=xlabel, ylabel=ylabel)
Read now
Unlock full access