This commit is contained in:
Tanushree Tunstall 2023-02-27 20:02:10 +00:00
parent a405cd8035
commit 1c616eeb71
7 changed files with 77 additions and 51 deletions

View file

@ -13,7 +13,8 @@ position_annotation=function(plot_df,
drug_colour='green',
lig1_colour='slategrey',
lig2_colour='navyblue',
lig3_colour='purple'
lig3_colour='purple',
x_label=NULL
)
{
x_ats = 12
@ -107,9 +108,9 @@ position_annotation=function(plot_df,
theme(plot.background = element_rect(fill = bg, colour=NA),
#plot.margin = margin(t=0,b=0),
panel.background = element_rect(fill = bg, colour=NA),
legend.position = "none"
legend.position = "none", axis.title.x = element_text(size = 8)
) +
labs(x = NULL, y= NULL) +
labs(x = x_label, y= NULL) +
geom_tile(aes(y = 1,x=reorder(position,-pos_count), fill = bg_all, colour = bg_all)
) +
geom_tile(aes(y = 2, x=reorder(position,-pos_count), fill = col_bg1, colour = col_bg1)
@ -146,9 +147,9 @@ position_annotation=function(plot_df,
theme(plot.background = element_rect(fill = bg, colour=NA),
#plot.margin = margin(t=0,b=0),
panel.background = element_rect(fill = bg, colour=NA),
legend.position = "none"
legend.position = "none", axis.title.x = element_text(size = 8)
) +
labs(x = NULL, y= NULL) +
labs(x = x_label, y= NULL) +
geom_tile(aes(y = 1, x=factor(position), fill = bg_all, colour = bg_all)
) +
geom_tile(aes(y = 2, x=factor(position), fill = col_bg1, colour = col_bg1)