Skip to content
Snippets Groups Projects
Commit 254f5d15 authored by Joana Fraxanet Morales's avatar Joana Fraxanet Morales
Browse files

fix plot

parent 35560876
No related branches found
No related tags found
No related merge requests found
......@@ -134,20 +134,13 @@ T_D = fit[0][0]
fig, ax = pyplot.subplots()
ax.scatter(T, c)
ax.set_title('Heat capacity of silver compared to the Debye and Einstein models')
ax.plot(temp, c_einstein(temp, T_E), label='Einstein model')
ax.plot(temp, c_debye(temp, T_D), label='Debye model')
ax.set_ylim(bottom=0, top=3.4)
ax.plot(temp, c_debye(temp, T_D), label=f'Debye model, $T_e={T_E:.5}$')
ax.plot(temp, c_einstein(temp, T_E), label=f'Einstein model, $T_e={T_E:.5}$')
ax.set_ylim(bottom=0, top=3)
ax.set_xlim(0, 215)
ax.set_xlabel('$T(K)$')
ax.set_ylabel(r'$C/k_B$')
ax.set_xticks([T_E, T_D])
ax.set_xticklabels(['$T_E$','$T_D$'])
ax.set_yticks([3])
ax.set_yticklabels(['$3$'])
ax.legend(loc='upper left')
pyplot.hlines([3], 0, 215, linestyles='dashed')
pyplot.vlines([T_E,T_D], 0, 3.4, linestyles='dashed')
#draw_classic_axes(ax, xlabeloffset=0.3)
ax.legend(loc='lower right');
```
## Exercises
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment