Skip to content

Instantly share code, notes, and snippets.

@mikekeith52
Created April 13, 2021 00:16
Show Gist options
  • Select an option

  • Save mikekeith52/17be4eb3ca7d7ff777d264dbe674c591 to your computer and use it in GitHub Desktop.

Select an option

Save mikekeith52/17be4eb3ca7d7ff777d264dbe674c591 to your computer and use it in GitHub Desktop.
sns.set(rc={'figure.figsize':(14,8)})
ax3 = sns.lineplot(x=data_cumsum_doses.index,y='total_distributed',data=data_cumsum_doses,color='purple',linestyle='--',label='Total Distributed')
sns.lineplot(x=data_cumsum_doses.index,y='people_vaccinated',data=data_cumsum_doses,color='red',label='Received at Least One Dose')
sns.lineplot(x=data_cumsum_doses.index,y='people_fully_vaccinated',data=data_cumsum_doses,color='orange',label='Fully Vaccinated')
above_val = 5000000
plt.text(data_cumsum_doses.index.to_list()[-1], data_cumsum_doses['total_distributed'].max() + above_val, '{:,.0f}'.format(data_cumsum_doses['total_distributed'].max()),size=14,color = 'purple')
plt.text(data_cumsum_doses.index.to_list()[-1], data_cumsum_doses['people_vaccinated'].max() + above_val, '{:,.0f}'.format(data_cumsum_doses['people_vaccinated'].max()),size=14,color = 'red')
plt.text(data_cumsum_doses.index.to_list()[-1], data_cumsum_doses['people_fully_vaccinated'].max() + above_val, '{:,.0f}'.format(data_cumsum_doses['people_fully_vaccinated'].max()),size=14,color = 'orange')
plt.ylabel('Cumulative Vaccine Counts')
plt.xlabel('Date')
plt.title('Cumulative Vaccines by Date',size=16)
plt.xticks(rotation=45)
ax3.yaxis.set_major_formatter(ticker.StrMethodFormatter('{x:,.0f}'))
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment