In [1]:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
%matplotlib inline
In [2]:
info = {'VAR': ['Total 1,25(OH)D', 'Site', 'Race', 'Total 25(OH)D', ' Oral Antibiotic Use'],
'ES_IND': [0.045545564, 0.031161839, 0.027166031, 0.001210949, 0.021151959],
'ES_CUL': [0.04554556, 0.02964010, 0.02223142, 0.01265013, 0.01270502]}
dat = pd.DataFrame(info, columns=['VAR', 'ES_IND', 'ES_CUL'])
In [3]:
dat
Out[3]:
In [4]:
sns.set(style="whitegrid")
# Plot cumulative effect size
sns.set_color_codes("muted")
ax = sns.barplot(x="ES_CUL", y="VAR", data=dat,
label="Dependent", color="b")
ax.set_xlabel('Effect Size', fontsize=16)
ax.set_ylabel('Non-redundant Covariates', fontsize=16)
ax = ax.get_figure()
ax.tight_layout()
ax.savefig('../figures/RDA_alpha.pdf')
ax.savefig('../figures/RDA_alpha.png')
In [ ]: