ass1: Fix elemental sc plot and add caption
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user