Skip to content

Commit

Permalink
add bibliography
Browse files Browse the repository at this point in the history
  • Loading branch information
clauswilke committed Jun 7, 2017
1 parent fc5ba73 commit 7cfb840
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
4 changes: 3 additions & 1 deletion _bookdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ rmd_files: [
#"bargraphs_logy.Rmd",
"overlapping_points.Rmd",

"notes.Rmd"
"notes.Rmd",

"references.Rmd"
]

before_chapter_script: "_common.R"
2 changes: 1 addition & 1 deletion background_grids.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ iris %>%
stamp_good(plot_grid(NULL, iris_plot + theme_pf_grid(), NULL, nrow=1, rel_widths=c(0.02, 1, 0.04)))
```

For figures where the relevant comparison is the $x=y$ line, I prefer to draw a diagonal line rather than a grid. For example, if we compare two sets of correlations, we can see immediately which correlations are systematically stronger (figure adapted from **Echave et al, need to add reference here**):
For figures where the relevant comparison is the $x=y$ line, I prefer to draw a diagonal line rather than a grid. For example, consider the following figure, adapted from @Echave-et-al-2016, which compares two sets of correlations for 209 protein structures. By drawing the diagonal line, we can see immediately which correlations are systematically stronger:
```{r message=FALSE, warning=FALSE}
cor_table = read_csv("datasets/Echave_et_al_2016_NRG_correlations.csv")
nrg_plot <- ggplot(cor_table, aes(y=cor.RSA, x=-cor.WCN)) +
Expand Down
8 changes: 8 additions & 0 deletions bibliography.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@article{Echave-et-al-2016,
author = {Echave, J. and Spielman, S. J. and Wilke, C. O.},
journal = {Nature Rev. Genet.},
pages = {109--121},
title = {Causes of evolutionary rate variation among protein sites},
volume = {17},
year = {2016}
}
3 changes: 3 additions & 0 deletions index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ author: "Claus O. Wilke"
description: "A guide for making figures that look professional and are publication-ready."
github-repo: clauswilke/professional_figures
site: bookdown::bookdown_site
bibliography: "bibliography.bib"
biblio-style: "apalike"
link-citations: true
output:
bookdown::gitbook: default
---
Expand Down
1 change: 1 addition & 0 deletions references.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
`r if (knitr:::is_html_output()) '# References {-}'`

0 comments on commit 7cfb840

Please sign in to comment.