suppressPackageStartupMessages({
  library(ggplot2)
  library(threed)
  library(ggthreed)
})

knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>", 
  fig.width = 6
)
library(ggplot2)
library(threed)
library(ggthreed)

Usage

Issues/Limitations

Example - Simple Pie Chart

ggplot(mtcars) + 
  geom_threedpie(aes(x = as.factor(cyl))) + 
  theme_void() + 
  theme(legend.position = 'bottom')

Example - Facetted Pie Chart

ggplot(diamonds)  +
  geom_threedpie(aes(as.factor(cut))) +
  facet_wrap(~clarity, labeller = label_both) +
  labs(title = "Distribution of Diamond Cuts by Clarity") +
  scale_fill_brewer(name = "Cut", palette = 'Set2') +
  theme_void()

Example - Behind the Scenes

ggplot(mtcars) + 
  geom_threedpie(aes(x = as.factor(cyl)), alpha = 0.5) + 
  theme_void() + 
  theme(legend.position = 'bottom')


coolbutuseless/ggthreed documentation built on May 16, 2019, 7:14 p.m.