https://github.com/eddelbuettel/tinythemes
Lightweight Repackaging of 'Themes' for 'ggplot2'
https://github.com/eddelbuettel/tinythemes
Last synced: 8 months ago
JSON representation
Lightweight Repackaging of 'Themes' for 'ggplot2'
- Host: GitHub
- URL: https://github.com/eddelbuettel/tinythemes
- Owner: eddelbuettel
- License: other
- Created: 2023-12-11T17:37:21.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-04T17:54:25.000Z (over 1 year ago)
- Last Synced: 2024-05-09T10:28:15.682Z (over 1 year ago)
- Language: R
- Size: 15.6 KB
- Stars: 20
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: ChangeLog
- License: LICENSE
Awesome Lists containing this project
- awesome-ggplot2 - tinythemes
README
## tinythemes -- Lightweight Repackaging of ggplot2 Themes
[](https://github.com/eddelbuettel/tinythemes/actions/workflows/r2u.yaml)
[](https://opensource.org/licenses/MIT)
[](https://cran.r-project.org/package=tinythemes)
[](https://eddelbuettel.r-universe.dev/tinythemes)
[](https://cran.r-project.org/package=tinythemes)
[](https://github.com/eddelbuettel/tinythemes)
### Example: Without, and With, The Theme

One the left are `ggplot()` defaults, on the right the theme is added.
### Motivation
The [hrbrthemes][hrbrthemes] package contains a nice theme as seen in the preceding example.
Installing the package, however, comes at cost of fourty-nine (yeah, really) additional packages:
```r
> db <- tools::CRAN_package_db()
> deps <- tools::package_dependencies(c("ggplot2", "hrbrthemes"), recursive=TRUE, db=db)
> Filter(\(x) x != "ggplot2", setdiff(deps[[2]], deps[[1]]))
[1] "extrafont" "knitr" "rmarkdown"
[4] "htmltools" "tools" "gdtools"
[7] "extrafontdb" "Rttf2pt1" "Rcpp"
[10] "systemfonts" "gfonts" "curl"
[13] "fontquiver" "base64enc" "digest"
[16] "ellipsis" "fastmap" "evaluate"
[19] "highr" "xfun" "yaml"
[22] "bslib" "fontawesome" "jquerylib"
[25] "jsonlite" "stringr" "tinytex"
[28] "cachem" "memoise" "mime"
[31] "sass" "fontBitstreamVera" "fontLiberation"
[34] "shiny" "crul" "crayon"
[37] "stringi" "cpp11" "urltools"
[40] "httpcode" "fs" "rappdirs"
[43] "httpuv" "xtable" "sourcetools"
[46] "later" "promises" "commonmark"
[49] "triebeard"
>
```
So this package goes the other way and currently contains only _one_ theme: `theme_ipsum_rc()`,
taken from [hrbrthemes][hrbrthemes] and minimally polished.
Installing this package from CRAN results in zero additional dependencies.
### What If Something Goes Wrong?
Good question. This package is for when you know the Roboto Condensed font is in fact present and
ready to be used. Package [hrbrthemes][hrbrthemes] has some documentation and helpers about what to
do when that is not the case; consult that documentation first.
### Author
The theme was written by Bob Rudis who is the principal author of [hrbrthemes][hrbrthemes].
This package was put together by Dirk Eddelbuettel
### License
tinythemese is released under the same terms as [hrbrthemes][hrbrthemes], namely the MIT license.
[hrbrthemes]: https://github.com/hrbrmstr/hrbrthemes