49 lines
1.5 KiB
R
49 lines
1.5 KiB
R
# 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
|