From b4a2dd730c1426c8ffd9fd28aa7320eafc6d45b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gi=C3=B9=20Marcer?= Date: Wed, 3 Jun 2020 14:28:45 +0200 Subject: [PATCH] ex-1: redo fig.3 both in the code and in the md --- ex-1/pdf-plot.py | 50 +++++++++++++++++++++++++++++++++++---- notes/images/1-notes.pdf | Bin 0 -> 13780 bytes notes/sections/1.md | 23 +----------------- 3 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 notes/images/1-notes.pdf diff --git a/ex-1/pdf-plot.py b/ex-1/pdf-plot.py index db0bbc7..07209c3 100755 --- a/ex-1/pdf-plot.py +++ b/ex-1/pdf-plot.py @@ -1,9 +1,49 @@ #!/usr/bin/env python -from pylab import * +from matplotlib import pyplot as plt +import numpy as np import sys -x, y = loadtxt(sys.stdin, unpack=True) -title('Landau distribution', loc='right') -plot(x, y, color='#92182b') -show() + +plt.figure() +# plt.figure(figsize=(5, 3)) +# plt.rcParams['font.size'] = 8 + +# useful coordinates +y_min = -0.0086 # y min axes +y_max = 0.1895 # y max axes +me = -0.22 # mode +f_me = 0.1806 # f(mode) +h_f_me = f_me/2 # falf f(mode) +x_m = -1.5867 # x₋ +x_p = 2.4330 # x₊ + +# prepare plot +x, y = np.loadtxt(sys.stdin, unpack=True) +plt.title('Landau distribution', loc='right') +plt.xlim(-10, 10) +plt.ylim(y_min, y_max) + +# draw the lines +plt.plot([-10, me], [f_me, f_me], color='gray') +plt.plot([me, me], [f_me, y_min], color='gray') +plt.plot([-10, x_p], [h_f_me, h_f_me], color='gray') +plt.plot([x_m, x_m], [y_min, h_f_me], color='gray') +plt.plot([x_p, x_p], [y_min, h_f_me], color='gray') + +# draw the function +plt.plot(x, y, color='#92182b') + +# draw the notes +s = 0.012 +S = 0.2 +plt.annotate('$f(m_e)$', [-10 + S, f_me - s]) +plt.annotate('$f(m_e)/2$', [-10 + S, h_f_me - s]) +plt.annotate('$x_-$', [x_m + S, y_min + s/2]) +plt.annotate('$x_+$', [x_p + S, y_min + s/2]) +plt.annotate('$m_e$', [me + S, y_min + s/2]) + + +plt.tight_layout() +plt.show() +# plt.savefig('notes/images/1-notes.pdf') diff --git a/notes/images/1-notes.pdf b/notes/images/1-notes.pdf new file mode 100644 index 0000000000000000000000000000000000000000..e7633326cfc18e8d2eaa8492214c669b27dcbef4 GIT binary patch literal 13780 zcmeHuc|4R~)HtCsRI)EEk3GWdGsaf-ExSUN3`WM@7?O&l(t;$E$dV{q*;1s%zNJ!0 z+Li3GW~py^?=w=!`~CGUpU>}~SD)Lx&w1{0&bjBg=bU@aNSbQt$fFf-2+7>nP)->F z4WS?(CwGL33WPKz@22=c7yvPcke2&=DG*YVOecH#?1t3T5EO40xTE5{0os9dT?;yy zPJwWM1=iH~S!@2R z^&xu*Y2ik8p?dFz2(!bjO`O~*&UA>#nEW?7XcPd<5uonv?L+qiOMvm302PWicp}YC zpiA@d_l00GH7y{d7A1h{OflC5OM@p%8rj>=mrSF0JMWvLe6~MW2x&xdp^`Ox0>QlS zVpswS!k`K88m90N`W(m1DSkfwG-tp` z3t;&+iuZ218-#{;#vC5#N2gK9UWmY?R_jMTmPD?*_wH5JrOHO_uHEpeP7Gn*%7JrV zi3RDkMX|FPNzhTeYoobgPk}66 zrMx_OL&~wUS9o_S9#o~~>L2HLtEie1wW(%&Q<8(xmL!eUcQ5nHu_j8Fhm3Z%wzebp zZb^Cbdc&?=Z(qMTChc>jd#YQ?WP5toCA;UY-qGKTwntvPaj-NCAMbM`c9X8;PU|xD z&o^Vuqw>ZCM0Va)y=4MXlbsrxQm-9auX)bZwCRld z8F`E5RFWtQr|^daTe&RxyGxCp)L=$^S8W(!g<|J#y;aYXsF)) zMLk->=Bs(tGNsFxZl0I5c=aXi^VfVM^)?Pfnbob8Jy(a=xegYxhXqP#KQzcl{D+%* zVxaZ0)B5&$JS{uR!yqGXf;70@eADxt#a^+V(NzYRWUaUxE`qqt9d8s%V`RV3}6FK1I+T=MtZhgD7{uw~tDDGF6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