plotScatterPie: plotScatterPie

Description Usage Arguments Examples

View source: R/plotScatterPie.R

Description

plot scatter pie chart for multidimension analysis, such as waternomics. This plot can provide information about water use/wastewater of each provinces and GDP mix of each provinces, see examples.

Usage

1
2
3
4
5
6
7
8
9
plotScatterPie(
  data,
  pieRange,
  pieColor = NULL,
  xmeanLine = TRUE,
  ymeanLine = TRUE,
  label_on = TRUE,
  output = FALSE
)

Arguments

data

a dataframe with colnames x, y, r, label, these four names must be in colnames.

pieRange

define which column to which column to be presented by pie chart, see examples

pieColor

color for different colors in pie chart

xmeanLine

if plot x mean line

ymeanLine

if plot y mean line

label_on

Whether to show label

output

if you want an ggplot object as output, default is FALSE

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
GDPColor_CWR <- c("#6B8033", "#020303", "#0D77B9")


data(GDPmix)

# in colnames(GDPmix), there must be x, y, r, label.
# but right now, GDPmix has x, y, r, but lacks a label column, let's assign label to province column
colnames(GDPmix)[1] <- 'label'

## Not run: 
plotScatterPie(GDPmix, pieRange = 4:6, pieColor = GDPColor_CWR)

## End(Not run)

gfer documentation built on Feb. 6, 2022, 5:06 p.m.