Skip to content

Instantly share code, notes, and snippets.

@erikaris
Created October 24, 2017 21:42
Show Gist options
  • Save erikaris/b0c44e2a96f4e90a74bebd66a4119338 to your computer and use it in GitHub Desktop.
Save erikaris/b0c44e2a96f4e90a74bebd66a4119338 to your computer and use it in GitHub Desktop.
import numpy as np
linear_data = np.array([1,2,3,4,5,6,7,8])
exponential_data = linear_data**2
plt.figure()
plt.plot(linear_data, '-o', exponential_data, '-o')
# fill the area between the linear data and exponential data
plt.gca().fill_between(range(len(linear_data)),
linear_data, exponential_data,
facecolor='blue',
alpha=0.25)
plt.legend(['Baseline', 'Competition'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment