plot_polygons: Plot Stacked Areas

Description Usage Arguments Value Examples

View source: R/simcom_functions.R

Description

Plot Stacked Areas

Usage

1
2
3
4
plot_polygons(data, poly.border.col = "grey10", poly.fill.col = c("white",
  "white", "white", "white", "#F8CBAE", "#FDF2CA", "#9DC3E6"),
  letters = c("P,S,E", "S,E", "P,E", "P,S", "E", "S", "P"),
  letter.col = "black", letters.right = FALSE, ...)

Arguments

data

The data frame that needs to be plotted. Should only contain the variables that should appear in the plot.

poly.border.col

The color of the border of the stacked areas.

poly.fill.col

The fill of the stacked areas. The areas are colored from top to bottom (i.e. the highest one first).

letters

The letters that should be placed in the areas. If NULL, the names of the data is used.

letter.col

The colors of the letters that are plotted.

...

Further arguments passed on to the plot function plot(...)

letters.right.

Logical, default is FALSE. If TRUE, the letters are set to the right of the plot.

Value

Plots areas that are scaled to 100

Examples

1
2
3
4
simulated_data <- sim_data()
comp_list <- cons_comp_analysis(simulated_data)
plot_data <- comp_list[[1]]
plot_polygons(plot_data, letters.right = TRUE)

kthorstmann/simcom documentation built on May 22, 2019, 4:41 p.m.