dashboard_ggpairs=function( plot_df, plot_title , tt_args_size = 2.5 , gp_args_size = 2.5 , method = "spearman" ){ if (method == "spearman") { title="ρ" } if (method == "kendall") { title="τ" } else { title="P" } ggpairs( plot_df, columns = 1:(ncol(plot_df)-1), upper = list( continuous = wrap( 'cor', # ggally_cor() method = "spearman", use = "pairwise.complete.obs", title=title, digits=2, justify_labels = "centre", title_args=list(size=tt_args_size, colour="black"),#2.5 group_args=list(size=gp_args_size)#2.5 ) ), lower = list( continuous = wrap("points", alpha = 0.7, size=0.125), combo = wrap("dot", alpha = 0.7, size=0.125) ), aes( colour = factor( ifelse( dst_mode==0, "S", "R" ) ), alpha = 0.5 ), title=plot_title ) + scale_colour_manual(values = c("red", "blue")) + scale_fill_manual(values = c("red", "blue")) #+ # theme(text = element_text(size=7, # face="bold")) }