https://github.com/eliocamp/tagger
Adds tags to 'ggpot2' facets
https://github.com/eliocamp/tagger
Last synced: 4 months ago
JSON representation
Adds tags to 'ggpot2' facets
- Host: GitHub
- URL: https://github.com/eliocamp/tagger
- Owner: eliocamp
- Created: 2020-07-18T02:22:12.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-12-11T20:54:46.000Z (over 2 years ago)
- Last Synced: 2025-02-28T22:13:19.053Z (over 1 year ago)
- Language: R
- Size: 265 KB
- Stars: 33
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.Rmd
Awesome Lists containing this project
README
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```
# tagger
The goal of tagger is to easily add tags to facetted plots in order to identify panles.
## Installation
You can install the development version from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("eliocamp/tagger")
```
## Example
In the default usage, you can simply add `tag_facets()` to add a tag to each panel of a ggplo2 plot.
```{r example}
library(tagger)
library(ggplot2)
ggplot(mtcars, aes(hp, mpg)) +
geom_point() +
facet_grid(cyl ~ vs) +
tag_facets()
```
If you want to tag rows and columns instead of each panel indivdually, you can set it with the `tag` argument.
```{r}
ggplot(mtcars, aes(hp, mpg)) +
geom_point() +
facet_grid(cyl ~ vs) +
tag_facets(tag = "rc")
```