Executed: Mon Mar 27 11:39:58 2017

Duration: 4 seconds.

Figure - usALEX 5 dsDNA samples FRET


In [1]:
from __future__ import division
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib as mpl
import seaborn as sns
from cycler import cycler
%matplotlib inline
%config InlineBackend.figure_format='retina'  # for hi-dpi displays
sns.set_style('whitegrid')

palette = ('Paired', 10)
sns.palplot(sns.color_palette(*palette))
sns.set_palette(*palette)


Load Data


In [2]:
data_file = 'results/usALEX-5samples-E-all-methods.csv'

In [3]:
E = pd.read_csv(data_file, index_col=0)
E.round(2)


Out[3]:
E KDE E Gauss PR KDE PR Gauss SNA E mean SNA E max
7d 92.90 92.43 92.87 92.22 91.25 93.51
12d 73.98 72.70 72.77 72.56 72.50 73.60
17d 42.68 42.26 43.14 41.98 42.25 41.81
22d 17.74 18.11 17.62 18.25 18.50 17.98
27d 8.26 8.40 7.81 7.85 8.00 8.00

In [4]:
import matplotlib
matplotlib.rcParams['svg.fonttype'] = 'none'

In [5]:
o = E.plot.bar(table=np.round(E, 1).T, linewidth=0)
plt.ylabel('FRET (%)')
plt.gca().xaxis.set_visible(False)
#plt.legend(bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0., frameon=True);
leg = plt.legend(bbox_to_anchor=(1.02, 1), frameon=True, borderpad=1);
leg.get_frame().set_edgecolor('white')
ax = plt.gca()
ax.spines['top'].set_visible(False)
ax.spines['right'].set_visible(False)
ax.spines['bottom'].set_visible(False)
ax.spines['left'].set_visible(False)

table = o.get_children()[-3]
table_props = table.properties()
table_cells = table_props['child_artists']
for cell in table_cells:
    cell.set_linewidth(0)
plt.savefig('figures/5dsDNA FRET usALEX.svg', dpi=300, bbox_inches='tight')



In [6]: