Created
May 1, 2015 10:08
-
-
Save Euphorbium/145aa60ccebb2de46c54 to your computer and use it in GitHub Desktop.
graph example
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
import matplotlib.pyplot as plt | |
from collections import Counter | |
def make_chart_simple_line_chart(plt): | |
years = [1950, 1960, 1970, 1980, 1990, 2000, 2010] | |
gdp = [300.2, 543.3, 1075.9, 2862.5, 5979.6, 10289.7, 14958.3] | |
# create a line chart, years on x-axis, gdp on y-axis | |
plt.plot(years, gdp, color='green', marker='o', linestyle='solid') | |
# add a title | |
plt.title("Nominal GDP") | |
# add a label to the y-axis | |
plt.ylabel("Billions of $") | |
plt.show() | |
make_chart_simple_line_chart(plt) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment