diff --git a/ex-6/plots/emd-round.py b/ex-6/plots/emd-round.py index 8db7084..30549e3 100644 --- a/ex-6/plots/emd-round.py +++ b/ex-6/plots/emd-round.py @@ -3,24 +3,26 @@ import matplotlib.pyplot as plt def plot(table, title='', log=False): - plt.figure() + plt.figure(figsize=(6.3, 6)) plt.suptitle(title) plt.subplot(211) if log: plt.xscale('log') - plt.title('EMD distance' + ' '*10, loc='right') + plt.title('EMD' + ' '*10, loc='right') plt.plot(table[0], table[1], color='#92182b') plt.tick_params(axis='y', labelcolor='#92182b') plt.ylabel('average', color='#92182b') - plt.ticklabel_format(style='sci', axis='y', scilimits=(0, 0)) + plt.ticklabel_format(style='sci', axis='y', + scilimits=(0, 0), useMathText=True) twin = plt.twinx() twin.plot(table[0], table[2], color='gray') twin.tick_params(axis='y', labelcolor='gray') twin.set_ylabel('standard deviation', color='gray') - twin.ticklabel_format(style='sci', axis='y', scilimits=(0, 0)) + twin.ticklabel_format(style='sci', axis='y', + scilimits=(0, 0), useMathText=True) plt.subplot(212) if log: @@ -29,12 +31,13 @@ def plot(table, title='', log=False): plt.xlabel('RL rounds') plt.plot(table[0], table[3], color='xkcd:gray') + plt.tight_layout() + -plt.rcParams['font.size'] = 12 table = np.loadtxt('ex-6/plots/emd-round.txt') plot(table[:27].T, title='noiseless', log=True) -plot(table[27:47].T, title=r'$\sigma=0.005$') -plot(table[47:67].T, title=r'$\sigma=0.01$') -plot(table[67:].T, title=r'$\sigma=0.05$') +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() diff --git a/notes/images/emd-rounds-0.005.pdf b/notes/images/emd-rounds-0.005.pdf new file mode 100644 index 0000000..a900305 Binary files /dev/null and b/notes/images/emd-rounds-0.005.pdf differ diff --git a/notes/images/emd-rounds-0.01.pdf b/notes/images/emd-rounds-0.01.pdf new file mode 100644 index 0000000..0642ee9 Binary files /dev/null and b/notes/images/emd-rounds-0.01.pdf differ diff --git a/notes/images/emd-rounds-0.05.pdf b/notes/images/emd-rounds-0.05.pdf new file mode 100644 index 0000000..2baf84c Binary files /dev/null and b/notes/images/emd-rounds-0.05.pdf differ diff --git a/notes/images/emd-rounds-0.pdf b/notes/images/emd-rounds-0.pdf new file mode 100644 index 0000000..02c7a92 Binary files /dev/null and b/notes/images/emd-rounds-0.pdf differ