various heat-bar/position tile faff

This commit is contained in:
Tanushree Tunstall 2022-08-09 18:15:54 +01:00
parent 94454d6fba
commit 5cbaef3d36
4 changed files with 140 additions and 48 deletions

View file

@ -2,7 +2,7 @@
# 1b: Define function: coloured barplot by subgroup
# LINK: https://stackoverflow.com/questions/49818271/stacked-barplot-with-colour-gradients-for-each-bar
#########################################################
source("~/git/LSHTM_analysis/scripts/functions/generate_distance_colour_map.R")
#source("~/git/LSHTM_analysis/scripts/functions/generate_distance_colour_map.R")
ColourPalleteMulti = function(df, group, subgroup){
@ -121,16 +121,16 @@ bp_stability_hmap <- function(plotdf = merged_df3
, axis.title.y = element_text(size = my_yaxts )
, plot.title = element_text(size = my_pts
, hjust = 0.5)) +
labs(title = p_title
, x = my_xlab
, y = my_ylab),
geom_tile(aes(, tpos0 # heat-mapped distance tiles along the bot
, width = tW0
, height = tH0)
, fill = plotdf$ligD_colours
, colour = plotdf$ligD_colours
, linetype = "blank") +
labs(title = p_title
, x = my_xlab
, y = my_ylab),
, linetype = "blank"), #end of distance-heat-bar
generate_distance_legend(plotdf),
ncol = 2,
#align = "hv",