Learn R Programming

ufs (version 0.5.12)

ggPie: A ggplot pie chart

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

ggPie(vector, scale_fill = ggplot2::scale_fill_viridis_d())

Value

A ggplot pie chart.

Arguments

vector

The vector (best to pass a factor).

scale_fill

The ggplot scale fill function to use for the colors.

Examples

Run this code
ggPie(mtcars$cyl);

Run the code above in your browser using DataLab