ggpie: A ggplot pie chart

Description Usage Arguments Value Note Author(s) Examples

Description

THis function creates a pie chart. Note that these are generally quite strongly advised against, as people are not good at interpreting relative frequencies on the basis of pie charts.

Usage

1
2
ggPie(vector,
      scale_fill = scale_fill_viridis(discrete=TRUE))

Arguments

vector

The vector (best to pass a factor).

scale_fill

The ggplot scale fill function to use for the colors.

Value

A ggplot pie chart.

Note

This function is very strongly based on the Mathematical Coffee post at http://mathematicalcoffee.blogspot.com/2014/06/ggpie-pie-graphs-in-ggplot2.html.

Author(s)

Amy Chan; implemented in this package (and tweaked a bit) by Gjalt-Jorn Peters.

Maintainer: Gjalt-Jorn Peters <gjalt-jorn@userfriendlyscience.com>

Examples

1
ggPie(mtcars$cyl);

Matherion/userfriendlyscience documentation built on May 7, 2019, 3:41 p.m.