Skip to content

Commit 805d090

Browse files
committed
adjust figure size to reduce vignette file size
1 parent bb2b20c commit 805d090

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

vignettes/UserGuide.Rmd

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ vignette: >
1010
---
1111

1212
```{r options, include = FALSE}
13-
knitr::opts_chunk$set(comment = NA, purl = FALSE, dpi = 96)
13+
knitr::opts_chunk$set(comment = NA, purl = FALSE, dpi = 96, fig.width = 0.5, fig.height = 0.7, dev = 'png')
1414
```
1515

1616
```{r render-how-to, include = FALSE, eval = FALSE, echo = FALSE}
@@ -589,7 +589,9 @@ create.pgs.density.plot(
589589
pgs.data = pgs.results.with.phenotype.analysis$pgs.output,
590590
output.dir = temp.dir,
591591
filename.prefix = 'vignette-example-basic',
592-
file.extension = 'png'
592+
file.extension = 'png',
593+
width = 5,
594+
height = 5
593595
)
594596
595597
```
@@ -617,7 +619,10 @@ create.pgs.density.plot(
617619
filename.prefix = 'vignette-example-phenotype',
618620
file.extension = 'png',
619621
tidy.titles = TRUE,
620-
phenotype.columns = c('binary.factor.phenotype', 'categorical.phenotype', 'continuous.phenotype')
622+
phenotype.columns = c('binary.factor.phenotype', 'categorical.phenotype', 'continuous.phenotype'),
623+
width = 5,
624+
height = 7,
625+
yaxes.cex = 1.2
621626
)
622627
623628
```
@@ -638,7 +643,9 @@ create.pgs.boxplot(
638643
pgs.data = pgs.results.with.phenotype.analysis$pgs.output,
639644
output.dir = temp.dir,
640645
filename.prefix = 'vignette-example-basic',
641-
file.extension = 'png'
646+
file.extension = 'png',
647+
width = 4,
648+
height = 4
642649
)
643650
644651
```
@@ -666,10 +673,11 @@ create.pgs.boxplot(
666673
file.extension = 'png',
667674
tidy.titles = TRUE,
668675
add.stripplot = FALSE,
669-
width = 8,
676+
width = 5,
670677
height = 11,
671678
alpha = 0.9,
672-
phenotype.columns = c('binary.factor.phenotype', 'categorical.phenotype', 'continuous.phenotype')
679+
phenotype.columns = c('binary.factor.phenotype', 'categorical.phenotype', 'continuous.phenotype'),
680+
titles.cex = 1.2
673681
)
674682
675683
```
@@ -692,12 +700,14 @@ create.pgs.with.continuous.phenotype.plot(
692700
filename.prefix = 'vignette-example-correlation',
693701
file.extension = 'png',
694702
tidy.titles = TRUE,
695-
phenotype.columns = c('continuous.phenotype', 'categorical.phenotype')
703+
phenotype.columns = c('continuous.phenotype', 'categorical.phenotype'),
704+
width = 5,
705+
height = 5
696706
)
697707
698708
```
699709

700-
```{r out.width = '70%', echo = FALSE}
710+
```{r out.width = '50%', echo = FALSE}
701711
knitr::include_graphics(file.path(temp.dir, correlation.filename));
702712
```
703713

@@ -727,7 +737,9 @@ create.pgs.rank.plot(
727737
pgs.data = pgs.results.with.phenotype.analysis$pgs.output,
728738
output.dir = temp.dir,
729739
filename.prefix = 'vignette-example-basic',
730-
file.extension = 'png'
740+
file.extension = 'png',
741+
width = 5,
742+
height = 6
731743
)
732744
733745
```
@@ -745,7 +757,9 @@ create.pgs.rank.plot(
745757
output.dir = temp.dir,
746758
filename.prefix = 'vignette-example-phenotype',
747759
file.extension = 'png',
748-
phenotype.columns = c('binary.factor.phenotype', 'binary.phenotype', 'categorical.phenotype', 'continuous.phenotype')
760+
phenotype.columns = c('binary.factor.phenotype', 'binary.phenotype', 'categorical.phenotype', 'continuous.phenotype'),
761+
width = 6,
762+
height = 8
749763
)
750764
751765
```
@@ -780,7 +794,10 @@ pgs.case.control.analysis <- analyze.pgs.binary.predictiveness(
780794
phenotype.column = 'binary.phenotype',
781795
output.dir = temp.dir,
782796
filename.prefix = 'vignette-example-basic',
783-
file.extension = 'png'
797+
file.extension = 'png',
798+
width = 5,
799+
height = 5,
800+
titles.cex = 1.2
784801
);
785802
```
786803

@@ -801,7 +818,10 @@ pgs.case.control.analysis.continuous <- analyze.pgs.binary.predictiveness(
801818
cutoff.threshold = 0, # binarize at 0
802819
output.dir = temp.dir,
803820
filename.prefix = 'vignette-example-continuous',
804-
file.extension = 'png'
821+
file.extension = 'png',
822+
width = 5,
823+
height = 5,
824+
titles.cex = 1.2
805825
);
806826
```
807827

0 commit comments

Comments
 (0)