Created
February 18, 2019 13:29
-
-
Save atusy/71ec8fc0be3a87b9bf796e4007664e6c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
--- | |
output: html_document | |
--- | |
```{r, fig.width = 7, fig.height = 4, cache = TRUE} | |
library(readr) | |
library(ggplot2) | |
library(patchwork) # remotes::install_github("thomasp85/patchwork") | |
d <- read_csv("https://gist.githubusercontent.com/atusy/eca1f1acb31720896660a9926adab756/raw/5b4643dabb9499459cedb0673ad4fe780568143d/example4geom-col.csv") | |
p <- ggplot(d, aes(x, n)) + geom_col(width = 1) | |
patchwork::wrap_plots( | |
p + coord_cartesian(xlim = c(1500, 2500)), | |
p + coord_cartesian(xlim = c(2000, 2200)), | |
p + coord_cartesian(xlim = c(2000, 2050)), | |
nrow = 1 | |
) | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment