In [1]:
# OBJECTIVE:
# Can we detect the error bars around a data point automatically?
# (Vertical and Horizontal)
In [7]:
# Generate a chart with error bars
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
In [10]:
x = np.linspace(0,10,10)
y = np.sin(x)
y_err = noise = np.random.normal(0,1,10)
In [23]:
plt.errorbar(x, y, yerr=y_err, fmt="o", capsize=10, ecolor="black", color="red")
plt.show()
In [24]:
plt.savefig("images/errorbars.png")
In [ ]: