This commit is contained in:
Tanushree Tunstall 2022-08-14 12:17:36 +01:00
parent c09d7530c9
commit 6f354ab390
10 changed files with 833 additions and 285 deletions

View file

@ -0,0 +1,49 @@
# Tweak for layout, fonts, and text sizes.
#svg('~/tmp/foo.svg', width=10, height=10, )
# Set the width/height to inches for print. 300 dpi is reasonably ok for "draft"
# output. To raise quality while preserving sanity, increase 'res' and
# DO NOT alter font/point/line sizes
#- [X] Black text for "Corr:" or replace with Rho symbol
#- [X] 0/1 == R/S
#- [X] "rho" symbol instead of "Corr:" text
#- [X] Dot size a bit smaller
#- [X] Plot lines slightly thinner
#
#
png('~/tmp/foo.png',
width=10,
height=10,
units="in",
res=300)
#
corr_plotting_df = corr_df_ps
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")) +
theme(
text = element_text(size=12, face="bold")
)
dev.off()
#Check all plots with LSHTM_analysis/scripts/plotting/plotting_colnames.R