various changes

This commit is contained in:
Tanushree Tunstall 2022-03-02 11:44:04 +00:00
parent 2274f01f23
commit 6c6709e41e
6 changed files with 198 additions and 29 deletions

View file

@ -28,6 +28,8 @@ wideP_consurf <- function(plotdf
, "1": "Variable"
, "2", "3", "4", "5", "6", "7", "8"
, "9": "Conserved")
, panel_col = "black"
, panel_col_fill = "black"
# axes title and label sizes
, x_axls = 12 # x-axis label size
@ -38,6 +40,7 @@ wideP_consurf <- function(plotdf
, ptitle = ""
, xlab = ""
, ylab = ""
, pts = 20
# plot margins
, t_margin = 0.5
@ -282,9 +285,11 @@ wideP_consurf <- function(plotdf
, vjust = 0)
, axis.title.x = element_text(size = x_axls)
, axis.title.y = element_text(size = y_axls )
, panel.background = element_rect(fill = "black", color = "black")
, panel.background = element_rect(fill = panel_col_fill, color = panel_col)
, panel.grid.major = element_line(color = "black")
, panel.grid.minor = element_line(color = "black")
, plot.title = element_text(size = pts
, hjust = 0.5)
, plot.margin = margin(t = t_margin
, r = r_margin
, b = b_margin
@ -400,8 +405,6 @@ wideP_consurf <- function(plotdf
out = g1
}
#####################################################
# #============================================
# # x-axis: geom_tiles ~ ligand distance
@ -548,13 +551,13 @@ wideP_consurf <- function(plotdf
, legend2
, ncol = 1
, align = "hv"
, rel_heights = c(3/4,1))
, rel_heights = c(2/4,3/4))
out2 = cowplot::plot_grid( out + theme(legend.position = "none")
, legs
, ncol = 2
, align = "hv"
, rel_widths = c(9/10, 0.5/10)
, rel_widths = c(9/10, 0.4/10)
)
}else{
out2 = cowplot::plot_grid( out + theme(legend.position = "none")