Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomas-neitmann/mdthemes
Markdown Themes for 'ggplot2'
https://github.com/thomas-neitmann/mdthemes
Last synced: 3 months ago
JSON representation
Markdown Themes for 'ggplot2'
- Host: GitHub
- URL: https://github.com/thomas-neitmann/mdthemes
- Owner: thomas-neitmann
- License: other
- Created: 2020-04-03T08:27:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-07-15T04:23:43.000Z (4 months ago)
- Last Synced: 2024-07-17T08:43:10.851Z (4 months ago)
- Language: R
- Homepage:
- Size: 105 KB
- Stars: 79
- Watchers: 6
- Forks: 3
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
mdthemes
================[![R build
status](https://github.com/thomas-neitmann/mdthemes/workflows/R-CMD-check/badge.svg)](https://github.com/thomas-neitmann/mdthemes/actions)
[![CRAN
Version](https://www.r-pkg.org/badges/version/mdthemes?color=green)](https://cran.r-project.org/package=mdthemes)
[![Total
Downloads](http://cranlogs.r-pkg.org/badges/grand-total/mdthemes?color=green)](https://cran.r-project.org/package=mdthemes)
[![Lifecycle
Status](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)## Overview
`{mdthemes}` adds support for rendering text as markdown to your
favorite `{ggplot2}` themes thanks to the awesome `{ggtext}` package.## Installation
The package is available from CRAN.
``` r
install.packages("mdthemes")
```Alternatively, you can install the latest development version from
GitHub.``` r
if (!requireNamespace("remotes", quietly = TRUE)) {
install.packages("remotes")
}
remotes::install_github("thomas-neitmann/mdthemes", upgrade = "never")
```## Usage
Currently, `{mdthemes}` contains all themes from `{ggplot2}`,
`{ggthemes}`, `{hrbrthemes}`, `{tvthemes}` and `{cowplot}` with support
for rendering text as markdown. All themes start with `md_` followed by
the name of the original theme, e.g. `md_theme_bw()`.``` r
library(ggplot2)
library(mdthemes)
data(mtcars)p <- ggplot(mtcars, aes(hp, mpg)) +
geom_point() +
labs(
title = "This is a **bold** title",
subtitle = "And an *italics* subtitle",
x = "**_hp_**",
caption = "A blue caption"
)p + theme_minimal()
p + md_theme_minimal()
`````` r
p + ggthemes::theme_fivethirtyeight()
p + md_theme_fivethirtyeight()
```## Going further
To learn more about `{mdthemes}` check out [this blog
post](https://thomasadventure.blog/posts/mdthemes-is-on-cran-markdown-powered-themes-for-ggplot2/)
accompanying the first CRAN release.