ass1: Fix elemental sc plot and add caption

This commit is contained in:
2022-02-17 16:25:36 +01:00
parent 25c041d509
commit 73a6a58723
2 changed files with 17 additions and 3 deletions

View File

@ -51,12 +51,22 @@ with open('sc_elements.tex', 'w') as table_file:
from matplotlib import pyplot as plt
fig, ax = plt.subplots(figsize=(15, 9))
fig, ax = plt.subplots(figsize=(10, 5))
#df.plot('rho_300', 'T_c', kind='scatter', ax=ax, loglog=True)
df.plot('rho_300', 'T_c', kind='scatter', ax=ax)
ax.set_xlabel('$\\rho_{300K}$')
ax.set_ylabel('$T_c$')
for k, v in df.iterrows():
ax.annotate(v['element'], (v['rho_300'], v['T_c']))
#ax.annotate(v['element'], (v['rho_300']*.95, v['T_c']*1.05))
ax.annotate(v['element'], (v['rho_300']-4, v['T_c']+.2))
#plt.axis(xmin=2e1, xmax=1.5e3, ymin=1e-4, ymax=1e2)
plt.tight_layout()
#fig.show()
fig.savefig('/home/kvkempen/Documents/20212022Q3/Superconductivity/assignments/sc_elements.pdf')
fig.savefig('/home/kvkempen/Documents/20212022Q3/Superconductivity/assignments/sc_elements.pdf', bbox_inches='tight')
#fig.savefig('/home/kvkempen/Documents/20212022Q3/Superconductivity/assignments/sc_elements.pdf')
plt.close(fig)