ggDonut: Draw a Donut plot

Description Usage Arguments Value Examples

View source: R/ggPieDonut.R

Description

Draw a Donut plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
ggDonut(
  data,
  mapping,
  addDonutLabel = TRUE,
  showRatio = TRUE,
  polar = TRUE,
  labelposition = 1,
  labelsize = 3,
  title = "",
  use.label = TRUE,
  use.labels = TRUE,
  alpha = 0.7,
  interactive = FALSE,
  palette = NULL,
  reverse = FALSE,
  xmin = 3,
  xmax = 4,
  start = 3 * pi/2,
  direction = 1,
  colour = "white",
  explode = NULL,
  explodePos = 0.5,
  ...
)

Arguments

data

A data.frame

mapping

Set of aesthetic mappings created by aes or aes_.

addDonutLabel

A logical value. If TRUE, labels are added to the Donuts

showRatio

A logical value. If TRUE, Ratios are added to the DonutLabels

polar

A logical value. If TRUE, coord_polar() function will be added

labelposition

A number indicating the label position

labelsize

label size. default value is 3

title

Plot title

use.label

Logical. Whether or not use column label in case of labelled data

use.labels

Logical. Whether or not use value labels in case of labelled data

alpha

transparency of geom_rect

interactive

A logical value. If TRUE, an interactive plot will be returned

palette

A character string indicating the color palette

reverse

If true, reverse palette colors

xmin

minimum x position

xmax

maximum x position

start

offset of starting point from 12 o'clock in radians

direction

1, clockwise; -1, counterclockwise

colour

colour of geom_rect

explode

number of donuts to explode

explodePos

explode position

...

further arguments to be passed to geom_rect_interactive

Value

An interactive Pie and Donut plot

Examples

1
2
3
4
5
require(ggplot2)
require(ggiraph)
require(plyr)
ggDonut(browsers,aes(donuts=version,count=share))
ggDonut(browsers,aes(donuts=version,count=share),palette="Reds",explode=c(2,4,6),labelposition=0)

cardiomoon/ggiraphExtra documentation built on Oct. 9, 2020, 4:16 a.m.