diff --git a/ex-6/dist-plot.py b/ex-6/dist-plot.py index ee8b2f3..93395f0 100755 --- a/ex-6/dist-plot.py +++ b/ex-6/dist-plot.py @@ -6,9 +6,7 @@ import sys n = int(input()) a, b, f = loadtxt(sys.stdin, unpack=True) -figure(figsize=(6.3, 2.5)) -plt.rcParams['font.size'] = 8 - +figure() subplot(131) title('FFT') xlabel('EMD', x=0) diff --git a/ex-6/plot.py b/ex-6/plot.py index f40135c..8a7fe9a 100755 --- a/ex-6/plot.py +++ b/ex-6/plot.py @@ -3,8 +3,7 @@ from pylab import * import sys -plt.figure(figsize=(5, 3)) -rcParams['font.size'] = 8 +figure() a, b, f = loadtxt(sys.stdin, unpack=True) title(sys.argv[1] if len(sys.argv) > 1 else "", loc='right') @@ -13,5 +12,7 @@ hist(a, np.insert(b, 0, a[0]), weights=100*f/sum(f), xlabel(r'$\theta$ (radians)') ylabel(r'$I(\theta)$ (a.u.)') +xlabel('$\\theta$') +ylabel('$I(\\theta)$') tight_layout() show() diff --git a/ex-6/plots/emd.py b/ex-6/plots/emd.py index f681a3f..55dbaf6 100755 --- a/ex-6/plots/emd.py +++ b/ex-6/plots/emd.py @@ -6,8 +6,7 @@ import sys def plot(table, title='', log=False): - plt.figure(figsize=(5, 2)) - plt.rcParams['font.size'] = 8 + plt.figure() plt.suptitle(title) plt.subplot(111) @@ -32,13 +31,18 @@ def plot(table, title='', log=False): file = sys.argv[1] if len(sys.argv) > 1 else 'noiseless' table = np.loadtxt('ex-6/plots/emd-' + file + '.txt') + if file == 'noiseless': - plot(table[:31].T, title=r'noise at $\sigma_N = 0.005$') + plot(table[:31].T, title=r'noise at $\sigma_N = 0.005$', log=True) plot(table[31:51].T, title=r'noise at $\sigma_N = 0.005$') plot(table[51:].T, title=r'noise at $\sigma_N = 0.01$') else: plot(table[:20].T, title=r'noise at $\sigma_N = 0.005$') plot(table[20:40].T, title=r'noise at $\sigma_N = 0.005$') plot(table[40:].T, title=r'noise at $\sigma_N = 0.01$') -plt.show() +plot(table[:27].T, title='noiseless', log=True) +plot(table[27:47].T, title=r'noise at $\sigma=0.005$') +plot(table[47:67].T, title=r'noise at $\sigma=0.01$') +plot(table[67:].T, title=r'noise at $\sigma=0.05$') +plt.show()