Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/R-CoderDotCom/cyberpunk
A function to create cyberpunk-style graphs with R based on ggplot2
https://github.com/R-CoderDotCom/cyberpunk
Last synced: 3 months ago
JSON representation
A function to create cyberpunk-style graphs with R based on ggplot2
- Host: GitHub
- URL: https://github.com/R-CoderDotCom/cyberpunk
- Owner: R-CoderDotCom
- License: mit
- Created: 2020-12-03T13:51:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2020-12-25T17:44:13.000Z (almost 4 years ago)
- Last Synced: 2024-08-03T23:24:21.332Z (3 months ago)
- Language: R
- Homepage:
- Size: 22.5 KB
- Stars: 26
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cyberpunk R package
A function to create cyberpunk-style graphs with R based on ggplot2**Important note**: the final aim of this project is to provide new ggplot2 geoms and themes based on this style. At this moment the project is just a preview (a ggplot2 wrapper actually). If you like this type of charts check also [ggCyberPunk](https://github.com/delabj/ggCyberPunk)
# Installation
```r
# Install the development version from GitHub:
# install.packages("devtools")
devtools::install_github("R-CoderDotCom/cyberpunk")
```# Line chart
```r
my_df <- data.frame(x = c(4, 5, 5, 7, 9, 8, 6, 7),
z = c(1, 1.5, 4, 3, 5, 6, 4.5, 5))
cyber_lines(x = 0:7,
df = my_df,
area = TRUE,
glow = TRUE,
bg.col = "black",
grid.col = rgb(1, 1, 1, 0.1),
main = "Cyberpunk")
```# Bar chart
```r
# Data
df <- data.frame(x = c("A","B","C","D"),
y = c(1:4))# Barplot
cyber_bars(df, area = FALSE, bg.col = "black")
```