Skip to content

Instantly share code, notes, and snippets.

@khaerulumam42
Created December 18, 2018 15:46
Show Gist options
  • Save khaerulumam42/180188c0634874fede6546ef49da871d to your computer and use it in GitHub Desktop.
Save khaerulumam42/180188c0634874fede6546ef49da871d to your computer and use it in GitHub Desktop.
import matplotlib
#matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
%matplotlib inline
import seaborn as sns
sns.set()
for i, code in enumerate(list(results.keys())[0:4]):
pd_data = pd.DataFrame.from_dict(results[code])
pd_data['date'] = pd.to_datetime(pd_data['date'])
plt.figure(figsize=(20, 3))
plt.plot(pd_data['date'], pd_data['currency'])
negara = dictkeys_from_value(country_codes, code)
plt.ylabel('Nilai')
plt.xlabel('Waktu')
plt.title("Nilai tukar {} ({}) ke USD (Dolar Amerika)".format(code,negara))
plt.savefig('./currency/{}_to_USD.jpg'.format(code))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment