Skip to content
This repository was archived by the owner on Mar 3, 2021. It is now read-only.

Commit 0a0db11

Browse files
committed
update panel labels on figure 4
1 parent ed92db3 commit 0a0db11

4 files changed

+20
-18
lines changed

R/6-simulation-figures.Rmd

+11-9
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,9 @@ Put three scenarios together to make a figure.
272272

273273
```{r fig.width=9.5, fig.height=2.833}
274274
r1 <-
275-
(none.cor.p | apparent.cor.p | hidden.cor.p) +
275+
(none.cor.p + annotate("text", x = -Inf, y = Inf, label = "(a)", hjust = -0.2, vjust = 1.2) |
276+
apparent.cor.p + annotate("text", x = -Inf, y = Inf, label = "(b)", hjust = -0.2, vjust = 1.2)|
277+
hidden.cor.p + annotate("text", x = -Inf, y = Inf, label = "(c)", hjust = -0.2, vjust = 1.2)) +
276278
plot_layout(guides = "collect") &
277279
#center subtitles
278280
theme(plot.subtitle = element_text(hjust = 0.5))
@@ -282,7 +284,9 @@ r1
282284

283285
```{r fig.width=9.5, fig.height=2.833}
284286
r2 <-
285-
(none.pca.p | apparent.pca.p | hidden.pca.p) &
287+
(none.pca.p + annotate("text", x = -Inf, y = Inf, label = "(d)", hjust = -0.2, vjust = 1.2)|
288+
apparent.pca.p + annotate("text", x = -Inf, y = Inf, label = "(e)", hjust = -0.2, vjust = 1.2) |
289+
hidden.pca.p + annotate("text", x = -Inf, y = Inf, label = "(f)", hjust = -0.2, vjust = 1.2)) &
286290
scale_y_continuous(expand = expansion(mult = c(0.12, 0.05))) &
287291
theme(legend.position = "none")
288292
r2
@@ -291,19 +295,17 @@ r2
291295

292296
```{r fig.width=9.5, fig.height=2.833}
293297
r3 <-
294-
(none.pls.p | apparent.pls.p | hidden.pls.p) &
298+
(none.pls.p + annotate("text", x = -Inf, y = Inf, label = "(g)", hjust = -0.2, vjust = 1.2)|
299+
apparent.pls.p + annotate("text", x = -Inf, y = Inf, label = "(h)", hjust = -0.2, vjust = 1.2)|
300+
hidden.pls.p + annotate("text", x = -Inf, y = Inf, label = "(i)", hjust = -0.2, vjust = 1.2)) &
295301
scale_y_continuous(expand = expansion(mult = c(0.12, 0.05))) &
296302
theme(legend.position = "none")
297303
r3
298304
```
299-
Can't get tags inside of plots with patchwork
305+
Can't get tags inside of plots with patchwork, using `annotate()` instead
300306

301307
```{r fig.width=9.5, fig.height=8.5}
302-
(r1/r2/r3) & plot_annotation(tag_levels = "a", tag_suffix = ")") &
303-
theme(
304-
plot.tag.position = c(0,1),
305-
plot.tag = element_text(vjust = 3, hjust = 0)
306-
)
308+
(r1/r2/r3)
307309
```
308310

309311

out/simulation biplots.png

68 Bytes
Loading

out/three-scenarios.png

16.2 KB
Loading

renv.lock

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]
1010
},
1111
"Bioconductor": {
12-
"Version": "3.11"
12+
"Version": "3.12"
1313
},
1414
"Packages": {
1515
"BH": {
@@ -84,10 +84,10 @@
8484
},
8585
"Matrix": {
8686
"Package": "Matrix",
87-
"Version": "1.2-18",
87+
"Version": "1.3-0",
8888
"Source": "Repository",
8989
"Repository": "CRAN",
90-
"Hash": "08588806cba69f04797dab50627428ed"
90+
"Hash": "a308a28fe951c437957ffe20c84e6b66"
9191
},
9292
"MatrixModels": {
9393
"Package": "MatrixModels",
@@ -283,10 +283,10 @@
283283
},
284284
"codetools": {
285285
"Package": "codetools",
286-
"Version": "0.2-16",
286+
"Version": "0.2-18",
287287
"Source": "Repository",
288288
"Repository": "CRAN",
289-
"Hash": "89cf4b8207269ccf82fbeb6473fd662b"
289+
"Hash": "019388fc48e48b3da0d3a76ff94608a8"
290290
},
291291
"colorspace": {
292292
"Package": "colorspace",
@@ -388,10 +388,10 @@
388388
},
389389
"foreign": {
390390
"Package": "foreign",
391-
"Version": "0.8-80",
391+
"Version": "0.8-81",
392392
"Source": "Repository",
393393
"Repository": "CRAN",
394-
"Hash": "ae1b1e15cc6ccb2bc61c0ac33e86d35f"
394+
"Hash": "74628ea7a3be5ee8a7b5bb0a8e84882e"
395395
},
396396
"fs": {
397397
"Package": "fs",
@@ -695,10 +695,10 @@
695695
},
696696
"nlme": {
697697
"Package": "nlme",
698-
"Version": "3.1-149",
698+
"Version": "3.1-151",
699699
"Source": "Repository",
700700
"Repository": "CRAN",
701-
"Hash": "7c24ab3a1e3afe50388eb2d893aab255"
701+
"Hash": "42c8ba2b6a32a6bf0874e93e3bd86a43"
702702
},
703703
"nloptr": {
704704
"Package": "nloptr",

0 commit comments

Comments
 (0)