Created
February 16, 2019 12:16
-
-
Save ccerv1/09e863b4f3ea94cb4ef9301cb967b937 to your computer and use it in GitHub Desktop.
Chart of coffee production by origin
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
| production_table /= 1000 # change to millions instead of thousands of bags | |
| fig, ax = plt.subplots() | |
| production_table.plot( | |
| kind='area', | |
| stacked=True, | |
| figsize=(12,8), | |
| alpha=0.4, | |
| colormap='Blues', | |
| legend=False, | |
| ax=ax | |
| ) | |
| ax.set_ylabel("Coffee Production (bags, millions)") | |
| # tighten up the x-axis | |
| max_year = production_table.index[-1] | |
| ax.set_xlim(max_year-YEARS_IN_SERIES+1, max_year) | |
| ax.set_xlabel("Crop Year") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment