Created
June 17, 2020 06:20
-
-
Save velotiotech/c0adf037bb795daec985270fc3d98a4d to your computer and use it in GitHub Desktop.
This file contains 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
# function to plot the graphs for average revenues or profits of the fortune 500 companies against year | |
def plot(x, y, ax, title, y_label): | |
ax.set_title(title) | |
ax.set_ylabel(y_label) | |
ax.plot(x, y) | |
ax.margins(x=0, y=0) | |
# function to plot the graphs with superimposed standard deviation | |
def plot_with_std(x, y, stds, ax, title, y_label): | |
ax.fill_between(x, y - stds, y + stds, alpha=0.2) | |
plot(x, y, ax, title, y_label) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment