ggArea: Draw an interactive area plot

Description Usage Arguments Value Examples

View source: R/ggArea.R

Description

Draw an interactive area plot

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
ggArea(
  data,
  mapping,
  position = "stack",
  palette = "Blues",
  reverse = TRUE,
  alpha = 0.4,
  size = 0.3,
  use.label = TRUE,
  use.labels = TRUE
)

Arguments

data

A data.frame

mapping

Set of aesthetic mappings created by aes or aes_.

position

Either "stack" or "fill"

palette

A character string indicating the color palette

reverse

If true, reverse palette colors

alpha

Transparency

size

Line size

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

Value

An area plot

Examples

1
2
3
4
require(gcookbook)
require(ggplot2)
ggArea(uspopage,aes(x=Year,y=Thousands,fill=AgeGroup))
ggArea(uspopage,aes(x=Year,y=Thousands,fill=AgeGroup),position="fill")

Example output

Loading required package: gcookbook
Loading required package: ggplot2

ggiraphExtra documentation built on Oct. 23, 2020, 7:39 p.m.