ex-6: tweak EMD histogram plots
This commit is contained in:
parent
f863d14f5f
commit
831418f460
@ -3,14 +3,14 @@
|
|||||||
from pylab import *
|
from pylab import *
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
rcParams['font.size'] = 12
|
|
||||||
|
|
||||||
n = int(input())
|
n = int(input())
|
||||||
a, b, f = loadtxt(sys.stdin, unpack=True)
|
a, b, f = loadtxt(sys.stdin, unpack=True)
|
||||||
|
|
||||||
|
figure(figsize=(6.3, 3))
|
||||||
|
|
||||||
subplot(131)
|
subplot(131)
|
||||||
title('FFT')
|
title('FFT')
|
||||||
xlabel('EDM')
|
xlabel('EMD', x=0)
|
||||||
ylabel('counts')
|
ylabel('counts')
|
||||||
hist(a[:n], insert(b[:n], 0, a[0]), weights=f[:n],
|
hist(a[:n], insert(b[:n], 0, a[0]), weights=f[:n],
|
||||||
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
||||||
@ -18,16 +18,12 @@ ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
|||||||
|
|
||||||
subplot(132)
|
subplot(132)
|
||||||
title('RL')
|
title('RL')
|
||||||
xlabel('EMD')
|
|
||||||
ylabel('counts')
|
|
||||||
hist(a[n:2*n], insert(b[n:2*n], 0, a[n]), weights=f[n:2*n],
|
hist(a[n:2*n], insert(b[n:2*n], 0, a[n]), weights=f[n:2*n],
|
||||||
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
||||||
ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
||||||
|
|
||||||
subplot(133)
|
subplot(133)
|
||||||
title('convolution')
|
title('convolution')
|
||||||
xlabel('EMD')
|
|
||||||
ylabel('counts')
|
|
||||||
hist(a[2*n:], insert(b[2*n:], 0, a[2*n]), weights=f[2*n:],
|
hist(a[2*n:], insert(b[2*n:], 0, a[2*n]), weights=f[2*n:],
|
||||||
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
histtype='stepfilled', color='#e3c5ca', edgecolor='#92182b')
|
||||||
ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
ticklabel_format(style='sci', axis='x', scilimits=(0, 0), useMathText=True)
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
notes/images/plot.pdf
Normal file
BIN
notes/images/plot.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user