diff --git a/R/6-simulation-figures.Rmd b/R/6-simulation-figures.Rmd index 42ff8fa..2e71ed7 100644 --- a/R/6-simulation-figures.Rmd +++ b/R/6-simulation-figures.Rmd @@ -310,7 +310,7 @@ Can't get tags inside of plots with patchwork Gonna make a version with no tags and just add them in the pdf I guess? ```{r fig.width=9.5, fig.height=8.5} -r1/r2/r3 +r1/r2/r3 + plot_annotation(title = "Fig. 4") ggsave(here("out", "three-scenarios.png"), width = 9.5, height = 8.5) ggsave(here("out", "three-scenarios.eps"), width = 9.5, height = 8.5) @@ -454,15 +454,20 @@ hidden.pls.bp I think I want 4 panels, PCA on the top, PLS on the bottom, apparent on the left, hidden on the right (to match figure 3) ```{r fig.height=6, fig.width=6.5} -(apparent.pca.bp + labs(subtitle = "PCA", title = "Apparent Predictors"))+ - (hidden.pca.bp + labs(subtitle = "PCA", title = "Hidden Predictors")) + - (apparent.pls.bp + labs(subtitle = "PLS")) + - (hidden.pls.bp + labs(subtitle = "PLS")) & scale_shape_manual(values = c("a" = "circle", "b" = "triangle open")) & +biplots <- + (apparent.pca.bp + labs(subtitle = "a) PCA, Apparent Predictors"))+ + (hidden.pca.bp + labs(subtitle = "b) PCA, Hidden Predictors")) + + (apparent.pls.bp + labs(subtitle = "c) PLS, Apparent Predictors")) + + (hidden.pls.bp + labs(subtitle = "d) PLS, Hidden Predictors")) & + scale_shape_manual(values = c("a" = "circle", "b" = "triangle open")) & + scale_y_continuous(expand = expansion(mult = c(0.05, 0.15))) & + theme_classic() & theme(text = element_text(size=10), - legend.position = "none", plot.title = element_text(hjust=0.5, vjust = 9)) & - plot_annotation(tag_levels = "A") -ggsave(here("out", "simulation biplots.png")) -ggsave(here("out", "simulation biplots.pdf")) + legend.position = "none", + plot.subtitle = element_text(hjust=0.1, vjust = -8)) +biplots + plot_annotation(title = "Fig. 5") +ggsave(here("out", "simulation biplots.png"), height = 84*2, width = 84*2, units = "mm") +ggsave(here("out", "simulation biplots.pdf"), height = 84*2, width = 84*2, units = "mm") ``` diff --git a/out/muir-biplots.png b/out/muir-biplots.png index 5fa40a9..7feb129 100644 Binary files a/out/muir-biplots.png and b/out/muir-biplots.png differ diff --git a/out/simulation biplots.png b/out/simulation biplots.png index bb8e843..414d345 100644 Binary files a/out/simulation biplots.png and b/out/simulation biplots.png differ diff --git a/out/three-scenarios.png b/out/three-scenarios.png index 37f7a5d..9c3ac91 100644 Binary files a/out/three-scenarios.png and b/out/three-scenarios.png differ