Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://i2z1.github.io/ggonion/

R package for drawing onion diagrams via ggplot2
https://i2z1.github.io/ggonion/

onion r visualisation

Last synced: 3 days ago
JSON representation

R package for drawing onion diagrams via ggplot2

Awesome Lists containing this project

README

        

---
output: github_document
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-"
)
```

```{r generate_hex, include=FALSE, fig.path="man/figures/hex-"}
library(hexSticker)
library(ggonion)

x <- c("1", "2", "3","4")
clr <- c("orange","#ecefa2", "#a2cda3","#8a99e9")
p <- ggonion(x, color = clr)
p

hexSticker::sticker(p, package="ggonion",
p_size=22,
p_y=1.5,
s_x=1,
s_y=.75,
s_width=1.3,
s_height=1,
h_fill = "#000000",
p_color = "#d1e942",
h_color = "#e06b17", #border
p_family = "teko",
filename="man/figures/hex.png")
```

# ggonion

R package for drawing onion diagrams with ggplot2

WIP (Work in progress)

## Installation

You can install development version if ggonion from Github with

```
devtools::install_github("i2z1/ggonion")
```

## Usage

```{r example, fig.asp = 1, fig.width = 4, fig.height = 4}
library(ggonion)

x <- c("1", "2", "3","4")
clr <- c("orange", "#ecefa2", "#a2cda3", "#8a99e9")
ggonion(x, color = clr)
```