Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ryan-odea/circles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

circles

An R package for creating circles

CRAN status Lifecycle: experimental R-CMD-check

A small package for drawing circles. Currently only supporting the bubblebath and draw_circles functions which creates a series of radii, emulating matlab's bubblechart function, and creates data for path or polygon plotting respectively.


Examples

library(circles); library(ggplot2); library(data.table)
# Create data
data <- bubblebath()
plotting_data <- draw_circles(data)

# Bind Fill aesthetic 
setDT(plotting_data)

data[, col := as.factor(sample(1:5, .N, replace = TRUE)), by = "group"]

# Plot
ggplot(data, aes(x = x, y = y, group = group, fill = col)) + 
  geom_polygon(alpha = 0.8) + 
  scale_fill_manual(values = wesanderson::wes_palette("AsteroidCity1")) + 
  theme_void() + 
  guides(fill = "none")

About

An R package for creating circles

Resources

License

Stars

Watchers

Forks

Languages