From 351ad894de26f8dcc235281d382a58fcb1993488 Mon Sep 17 00:00:00 2001
From: Anton Akhmerov <anton.akhmerov@gmail.com>
Date: Wed, 25 Apr 2018 13:16:19 +0200
Subject: [PATCH] add labels to debye plot and einstein for comparison

---
 code/heat_capacity.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/code/heat_capacity.py b/code/heat_capacity.py
index 9eb0e83a..7c6a048c 100644
--- a/code/heat_capacity.py
+++ b/code/heat_capacity.py
@@ -55,7 +55,8 @@ def plot_debye():
     T = np.linspace(0.01, 1.5, 500)
     fig, ax = pyplot.subplots()
 
-    ax.plot(T, c_debye(T))
+    ax.plot(T, c_einstein(T), label="Einstein model")
+    ax.plot(T, c_debye(T), label="Debye model")
 
     ax.set_ylim(bottom=0, top=3.4)
     ax.set_xlabel('$T$')
@@ -64,6 +65,7 @@ def plot_debye():
     ax.set_xticklabels([r'$\Theta_D$'])
     ax.set_yticks([3])
     ax.set_yticklabels(['$3Nk_B$'])
+    ax.legend(loc='lower right')
     pyplot.hlines([3], 0, 1.5, linestyles='dashed')
     draw_classic_axes(ax, xlabeloffset=0.3)
     pyplot.savefig('debye.svg')
@@ -72,6 +74,7 @@ def plot_debye():
 def main():
     os.chdir('docs/figures')
     plot_einstein()
+    plot_debye()
 
 if __name__ == "__main__":
     main()
-- 
GitLab