Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://i2z1.github.io/ggonion/
R package for drawing onion diagrams via ggplot2
https://i2z1.github.io/ggonion/
onion r visualisation
Last synced: about 1 month ago
JSON representation
R package for drawing onion diagrams via ggplot2
- Host: GitHub
- URL: https://i2z1.github.io/ggonion/
- Owner: i2z1
- License: gpl-3.0
- Created: 2023-04-20T20:16:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-20T16:02:55.000Z (3 months ago)
- Last Synced: 2024-11-12T07:12:38.869Z (about 1 month ago)
- Topics: onion, r, visualisation
- Language: R
- Homepage: https://i2z1.github.io/ggonion/
- Size: 1.18 MB
- Stars: 8
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.Rmd
- License: LICENSE
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)
phexSticker::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)
```