colour changes
This commit is contained in:
parent
c6a720770d
commit
c8f3ddf892
5 changed files with 34 additions and 17 deletions
|
@ -321,12 +321,25 @@ svg('/tmp/foo.svg', width=10, height=10, )
|
|||
|
||||
corr_plotting_df = corr_df_ps
|
||||
|
||||
ggpairs(corr_plotting_df, columns = 1:(ncol(corr_plotting_df)-1)
|
||||
, upper = list(continuous = wrap('cor', method = "spearman"))
|
||||
, aes(colour = factor(dst_mode), alpha = 0.5)
|
||||
, title="correlogram with ggpairs()") +
|
||||
ggpairs(corr_plotting_df, columns = 1:(ncol(corr_plotting_df)-1),
|
||||
upper = list(continuous = wrap('cor',
|
||||
method = "spearman",
|
||||
title="ρ",
|
||||
digits=2,
|
||||
title_args=c(colour="black")
|
||||
)
|
||||
),
|
||||
lower = list(
|
||||
continuous = wrap("points", alpha = 0.7, size=0.5),
|
||||
combo = wrap("dot", alpha = 0.7, size=0.5)
|
||||
),
|
||||
aes(colour = factor(ifelse(corr_plotting_df$dst_mode==0, "S", "R")), alpha = 0.5),
|
||||
title="Stability") +
|
||||
scale_colour_manual(values = c("red", "blue")) +
|
||||
scale_fill_manual(values = c("red", "blue"))
|
||||
scale_fill_manual(values = c("red", "blue")) +
|
||||
theme(
|
||||
text = element_text(size=12, face="bold")
|
||||
)
|
||||
|
||||
dev.off()
|
||||
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
# position_annotation takes a Data Frame (df) and returns a ggplot object.
|
||||
#
|
||||
# This plots position tiles for the (up to) three ligands as well as drug
|
||||
position_annotation=function(plot_df, bg="transparent"){
|
||||
x_ats = 12
|
||||
x_tangle = 90
|
||||
x_tts = 20
|
||||
y_tts = 23
|
||||
xtt_col = "black"
|
||||
ytt_col = "black"
|
||||
leg_dir = "horizontal"
|
||||
leg_ts = 15
|
||||
leg_tts = 16
|
||||
leg_pos = "none"
|
||||
|
||||
#plot_df = generate_distance_colour_map(plot_df, debug=TRUE)
|
||||
|
||||
ggplot(plot_df,
|
||||
aes(x=factor(position), # THIS STUPID FUCKING FACTOR THING
|
||||
)
|
||||
) +
|
||||
geom_tile(aes(y=0, fill= bg_all, colour = bg_all)
|
||||
) +
|
||||
geom_tile(aes(y=1, fill= col_bg1, colour = col_bg1)
|
||||
) +
|
||||
geom_tile(aes(y=2, fill= col_bg2, colour = col_bg2)
|
||||
) +
|
||||
geom_tile(aes(y=3, fill= col_bg3, colour = col_bg3)
|
||||
) +
|
||||
|
||||
scale_x_discrete("Position", labels=factor(plot_df$position)) +
|
||||
scale_color_manual(values = c(
|
||||
"brown"="brown",
|
||||
"purple"="purple",
|
||||
"transparent"="transparent",
|
||||
"blue"="blue", "cyan"="cyan",
|
||||
"cornflowerblue"="cornflowerblue"
|
||||
),
|
||||
expand=c(0,0)
|
||||
) +
|
||||
scale_fill_manual(values = c(
|
||||
"brown"="brown",
|
||||
"purple"="purple",
|
||||
"transparent"="transparent",
|
||||
"blue"="blue",
|
||||
"cyan"="cyan",
|
||||
"cornflowerblue"="cornflowerblue"
|
||||
),
|
||||
expand=c(0,0)
|
||||
) +
|
||||
#scale_x_continuous(expand=c(0,0)) +
|
||||
#scale_y_continuous(expand=c(0,0)) +
|
||||
theme_nothing() +
|
||||
|
||||
theme(plot.background = element_rect(fill = bg, colour=NA),
|
||||
plot.margin = margin(t=0,b=0)) +
|
||||
labs(x = NULL, y = NULL)
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue