Skip to content

Instantly share code, notes, and snippets.

@santiagocasas
Last active March 17, 2020 19:58
Show Gist options
  • Save santiagocasas/f8205063e74d12e21041fe0154caebc2 to your computer and use it in GitHub Desktop.
Save santiagocasas/f8205063e74d12e21041fe0154caebc2 to your computer and use it in GitHub Desktop.
plotdataframe
for country in countries_list:
print(country)
dates=df_dict[country].index
plt.semilogy(dates, np.array(list(df_dict[country]['Cases'].values)), label=country)
plt.legend(loc='lower right')
plt.tick_params(rotation=45, labelsize=12)
plt.ylabel(casestr, fontsize=14)
plt.xlim([dates[0]-np.timedelta64(3,'D'), dates[-1]+np.timedelta64(10,'D')])
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment