Giù Marcer
5634f2f418
All the usefull plots were generated and the codes were suitably modified for this purpose.
36 lines
1006 B
Python
Executable File
36 lines
1006 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
from pylab import *
|
|
import sys
|
|
|
|
n = int(input())
|
|
a, b, f = loadtxt(sys.stdin, unpack=True)
|
|
|
|
figure(figsize=(6.3, 2.5))
|
|
plt.rcParams['font.size'] = 8
|
|
|
|
subplot(131)
|
|
title('FFT')
|
|
xlabel('EMD', x=0)
|
|
ylabel('counts')
|
|
hist(a[:n], insert(b[:n], 0, a[0]), weights=f[:n],
|
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
|
ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
|
|
|
subplot(132)
|
|
title('RL')
|
|
hist(a[n:2*n], insert(b[n:2*n], 0, a[n]), weights=f[n:2*n],
|
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
|
ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
|
|
|
subplot(133)
|
|
title('convolution')
|
|
hist(a[2*n:], insert(b[2*n:], 0, a[2*n]), weights=f[2*n:],
|
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
|
ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
|
|
|
tight_layout()
|
|
|
|
name = (sys.argv[1] if len(sys.argv) > 1 else "prova")
|
|
savefig('notes/images/' + name + '.pdf' )
|