-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
226 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,42 @@ | ||
#ggplot2 {#ggplot2} | ||
|
||
```{r setup, include=FALSE} | ||
knitr::opts_chunk$set(fig.width=6, fig.height=6) | ||
``` | ||
|
||
The book "ggplot2. Elegant graphics for data analysis" [@Wickham2009] is the best | ||
reference for learning ggplot2 | ||
|
||
Other useful resources include: | ||
|
||
- AVML 2012: ggplot2 http://www.ling.upenn.edu/~joseff/avml2012/ by | ||
Josef Fruehwald. This is one of the best introductions to ggplot2, | ||
highly recommended! There is a more recent version of this tutorial | ||
also here: http://jofrhwld.github.io/teaching/courses/2017_lvc/practicals/7_practical_r.html#inheritance | ||
|
||
All the examples in this chapter assume that ggplot2 has been | ||
installed and is loaded in your R session. If not, you can install it with: | ||
```{r eval=FALSE} | ||
install.packages("ggplot2") | ||
``` | ||
|
||
and load it with: | ||
|
||
```{r message=FALSE} | ||
library(ggplot2) | ||
``` | ||
|
||
###Log axis with pretty tickmarks | ||
|
||
```{r fig.cap="log axis with pretty tickmarks"} | ||
x = c("cnd1", "cnd2") | ||
y = c(0.4, 80) | ||
dat = data.frame(x=x, y=y) | ||
p = ggplot(dat, aes(x=x, y=y)) + geom_point() | ||
p = p + scale_y_continuous(trans="log10") | ||
p = p + annotation_logticks(sides="l") | ||
p = p + theme_bw(base_size=12) | ||
p | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,4 +15,3 @@ always_allow_html: yes | |
description: "A guide for the R programming language." | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.