MyNixOS website logo
Description

Lightweight Repackaging of 'Themes' for 'ggplot2'.

Themes for 'ggplot2' are a convenient way to style plots. The 'hrbrthemes' package contains a particularly nice one, but brings along a significant tail of dependencies. So this (currently experimental) package brings along just the 'theme_ipsum_rc' theme using the 'Roboto' 'Condensed' font. Should the font not be installed on your system, see the help in the package 'hrbrthemes' on how to install 'Roboto Condensed'.

tinythemes -- Lightweight Repackaging of ggplot2 Themes

CI License CRAN r-universe Dependencies Last Commit

Example: Without, and With, The Theme

One the left are ggplot() defaults, on the right the theme is added.

Motivation

The 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:

> 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 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 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.

This package was put together by Dirk Eddelbuettel

License

tinythemese is released under the same terms as hrbrthemes, namely the MIT license.

Metadata

Version

0.0.2

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows