Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/i2z1/ggonion
R package for drawing onion diagrams via ggplot2
https://github.com/i2z1/ggonion
onion r visualisation
Last synced: about 1 month ago
JSON representation
R package for drawing onion diagrams via ggplot2
- Host: GitHub
- URL: https://github.com/i2z1/ggonion
- Owner: i2z1
- License: gpl-3.0
- Created: 2023-04-20T20:16:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-06-16T20:54:28.000Z (over 1 year ago)
- Last Synced: 2024-08-03T23:23:36.949Z (5 months ago)
- Topics: onion, r, visualisation
- Language: R
- Homepage: https://i2z1.github.io/ggonion/
- Size: 241 KB
- Stars: 6
- 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)
```