Created
October 24, 2017 21:42
-
-
Save erikaris/b0c44e2a96f4e90a74bebd66a4119338 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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