print 'Nonparametric sign test for nbr > mat: P = %f'%nst_pval ''' # # Make figure # width=160 height=175 bottom=5 fig = plt.figure(figsize=(mm2inch(width),mm2inch(height+bottom))) sns.set(font_scale=0.8) # Make a labler to add labels to subplots labeler = Labeler(xpad=.07,ypad=0.02,fontsize=10) left = width_mm2fig(15,fig) stat_left = left middle = width_mm2fig(70,fig) right = width_mm2fig(125,fig) level1 = height_mm2fig(140+bottom,fig) level2 = height_mm2fig(105+bottom,fig) level3 = height_mm2fig(60+bottom,fig) level4 = height_mm2fig(10+bottom,fig) hm_width = width_mm2fig(160,fig) hm_height = height_mm2fig(20,fig) stat_width = width_mm2fig(30,fig) stat_height = height_mm2fig(30,fig) labelsize = 8
# sns.heatmap(df_neighbor.transpose()) # xticks = np.arange(0,df_neighbor.shape[0],5) # plt.xticks(xticks+.5,xticks); # plt.yticks(rotation=0); width = 80 height = 130 bottom = 5 fig = plt.figure(figsize=(mm2inch(width), mm2inch(height + bottom))) sns.set(font_scale=0.8, style='dark') # Set colormap cmap = "coolwarm" # Set positions left = width_mm2fig(9, fig) level0 = height_mm2fig(128 + bottom, fig) level1 = height_mm2fig(78 + bottom, fig) level2 = height_mm2fig(0 + bottom, fig) # Set plot sizes width = width_mm2fig(70, fig) matrix_height = height_mm2fig(12.5, fig) neighbor_height = height_mm2fig(65, fig) # Set font sizes labelsize = 8 panelsize = 12 ## Matrix modl parameters vmin = -.8
# plt.subplot(122) # sns.regplot(crp_true_model.flatten(),crp_learned_model.flatten()) # plt.xlabel('CRP True') # plt.ylabel('CRP Learned') # plt.tight_layout() width=160 height=140 bottom=5 fig = plt.figure(figsize=(mm2inch(width),mm2inch(height+bottom))) #fig = plt.figure(figsize=(mm2inch(170),mm2inch(155))) sns.set(font_scale=0.8) left = width_mm2fig(20,fig) stat_left = width_mm2fig(25,fig) middle = width_mm2fig(100,fig) level1 = height_mm2fig(105+bottom,fig) level2 = height_mm2fig(65+bottom,fig) level3 = height_mm2fig(10+bottom,fig) hm_width = width_mm2fig(145,fig) hm_height = height_mm2fig(20,fig) stat_width = width_mm2fig(40,fig) stat_height = height_mm2fig(40,fig) labelsize = 8 panelsize = 12
df_dms_yannotation = df2.iloc[:, 2:].transpose().reset_index()[['index']] # # Plot # plt.figure(figsize=(6.5,2)) # ax = sns.heatmap(df_dms_comparison.transpose(),annot=True,fmt="d") # gelx(ax,df_dms_xannotation,annotation_spacing=0.4) # gely(ax,df_dms_yannotation,annotation_spacing=0.4) width = 85 height = 52 bottom = 5 fig = plt.figure(figsize=(mm2inch(width), mm2inch(height + bottom))) #fig = plt.figure(figsize=(mm2inch(85),mm2inch(50))) sns.set(font_scale=0.8) left = width_mm2fig(20, fig) middle = width_mm2fig(50, fig) level1 = height_mm2fig(30 + bottom, fig) level2 = height_mm2fig(5 + bottom, fig) hm_width = width_mm2fig(60, fig) hm_height = height_mm2fig(10, fig) labelsize = 8 panelsize = 12 param_lims = [-1, 1] param_ticks = [-1, -.5, 0, .5, 1] # Set colormaps