Skip to content

Instantly share code, notes, and snippets.

@IanCarrasco
Created December 13, 2017 19:44
Show Gist options
  • Save IanCarrasco/fd440a3763a80e1705a1fd3c362c212a to your computer and use it in GitHub Desktop.
Save IanCarrasco/fd440a3763a80e1705a1fd3c362c212a to your computer and use it in GitHub Desktop.
%matplotlib inline
from matplotlib import pyplot as plt
import numpy as np
import pandas as pd
plt.style.use('fivethirtyeight')
x = np.linspace(0, 10)
data = pd.read_csv('whr2017.csv')
# Fixing random state for reproducibility
fig, ax = plt.subplots()
ax.scatter(data["Log GDP per capita"],data["Healthy life expectancy at birth"],color="teal")
ax.set_title("GDP vs. Life Expectancy")
ax.set_xlabel("Log GDP")
ax.set_ylabel("Life Expectancy")
fig.set_size_inches(12.5, 7.5)
fig.savefig('test4png.png', dpi=100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment