updated my_pairs_panel.R to make the dots coloured
This commit is contained in:
parent
996d67b423
commit
b98977336c
1 changed files with 30 additions and 14 deletions
|
@ -1,24 +1,40 @@
|
|||
my_corr_pairs <- function (corr_data){
|
||||
my_corr_pairs <- function (corr_data_all
|
||||
, corr_data_range = 1:length(corr_data_all)
|
||||
, corr_method = "spearman" # other options: "pearson" or "kendall"
|
||||
, colour_categ_col = "mutation_info_labels"
|
||||
, categ_colour = c("#E69F00", "#999999")
|
||||
, density_show = F
|
||||
, hist_col = "coral4"
|
||||
, dot_size = 1.6
|
||||
, ats = 1
|
||||
, corr_lab_size = 1
|
||||
, corr_value_size = 1)
|
||||
{
|
||||
|
||||
OutPlot_corr = pairs.panels(corr_data
|
||||
, method = "spearman" # correlation method
|
||||
, hist.col = "grey" ##00AFBB
|
||||
, density = TRUE # show density plots
|
||||
, ellipses = F # show correlation ellipses
|
||||
corr_data_df = corr_data_all[corr_data_range]
|
||||
my_bg = categ_colour[corr_data_all[[colour_categ_col]] ]
|
||||
|
||||
OutPlot_corr = pairs.panels(corr_data_df
|
||||
, method = corr_method
|
||||
, hist.col = hist_col
|
||||
, density = density_show
|
||||
, ellipses = F
|
||||
, smooth = F
|
||||
, stars = T
|
||||
, rug = F
|
||||
, breaks = "Sturges"
|
||||
, show.points = T
|
||||
#, bg = c("#f8766d", "#00bfc4")[unclass(factor(corr_ps$duet_outcome))] # foldx colours are reveresed
|
||||
#, pch = 21 # for bg
|
||||
, jitter = T
|
||||
#, bg = c("#f8766d", "#00bfc4")[unclass(factor(corr_data$duet_outcome))] # foldx colours are reveresed
|
||||
, bg = my_bg
|
||||
, pch = 21
|
||||
, alpha = 1
|
||||
, cex = 1.8
|
||||
, cex.axis = 2
|
||||
, cex.labels = 3.5
|
||||
, cex.cor = 1
|
||||
, smooth = F)
|
||||
, cex = dot_size
|
||||
, cex.axis = ats
|
||||
, cex.labels = corr_lab_size
|
||||
, cex.cor = corr_value_size
|
||||
)
|
||||
return(OutPlot_corr)
|
||||
#return (my_bg)
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue