Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/michbur/stormlight-ggplot2

Alethi font from Brandon Sanderson's Stormlight Archive and example usage in R
https://github.com/michbur/stormlight-ggplot2

font ggplot2 r stormlight-archive

Last synced: 9 days ago
JSON representation

Alethi font from Brandon Sanderson's Stormlight Archive and example usage in R

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
```

# Alethi font in ggplot2

This repository contains:

- the Alethi font, as created by turos of tempered steel (obtained from https://www.17thshard.com/forum/topic/2285-alethi-font-and-transliterator-re-launch/).
- the code examples for the usege of the Alethi font in ggplot2 (**figure.R**).
- the dataset on the eyebrow raising was created by [Ning1253](https://github.com/Ning1253) and published here: https://github.com/Ning1253/StormlightBlush/. I converted it to .csv using **get-data.R**.

```{r example}
library(ggplot2)
library(showtext)

font_add(family = "AlethiTS_lined", regular = "AlethiTS Fontv2/AlethiTS_lined.ttf")

showtext_auto()

dat <- read.csv("stormlight-blushes.csv")

p <- ggplot(dat, aes(x = char, y = blushes)) +
geom_col() +
scale_x_discrete("Character") +
scale_y_continuous("Number of blushes") +
coord_flip() +
theme_bw() +
theme(legend.position = "bottom",
axis.title = element_text(family = "AlethiTS_lined"),
axis.text.y = element_text(family = "AlethiTS_lined", size = 3))

```

*Journey before destination*.